Closed jwang-lilly closed 4 years ago
Dear Jian,
Many thanks for using the package. Because the R package administrators have emailed me about problems with trelliscopejs (the maintainer does not respond and the functions might not be supported soon), they asked me to remove everything related to trelliscopejs. :( The older version should work (I will reply in a different thread).
Best regards, Xinyue
From: Jian Wang notifications@github.com Sent: Tuesday, 5 May 2020 1:41 PM To: xinyue-L/PML PML@noreply.github.com Cc: Dr. LI Xinyue xinyueli@cityu.edu.hk; Mention mention@noreply.github.com Subject: [xinyue-L/PML] vignettes visualization section examples don't work (#2)
Hi @xinyue-Lhttps://github.com/xinyue-L, It seems none of the examples in the visualization section of this vignettes work with the PML 1.2 https://cran.r-project.org/web/packages/PML/vignettes/PML.html
R 3.6.3 trelliscopejs_0.2.4 PML_1.2
Thanks much for any insight?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/xinyue-L/PML/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM5JFAR4QPRA4JT47TQITCTRP6RGLANCNFSM4MZJFIYA.
Disclaimer: This email (including any attachments) is for the use of the intended recipient only and may contain confidential information and/or copyright material. If you are not the intended recipient, please notify the sender immediately and delete this email and all copies from your system. Any unauthorized use, disclosure, reproduction, copying, distribution, or other form of unauthorized dissemination of the contents is expressly prohibited.
Hi Xinyue,
trelliscopejs was active just a couple of month ago https://github.com/hafen/trelliscopejs. You are right, it has a new release so that may have broken the tre() in PML. It could be a minor fix in PML? Could you upload a new version of PML (same as cran version) to github? By the way, which version of trelliscopejs is compatible with PML? The new release has a few major features so I kind of hesitating to go back.
Thanks so much for the great package.
@xinyue-L Just want to give a quick update: I tried the current (0.2.4) and two previous versions (0.1.14 and 0.1.18) of telliscopejs from cran archives, function tre() give the exact same error message as the following: No trelliscope individual plots are generated due to the archived trelliscopejs package.
I can see that this statement is hardcoded in the PML package (see below).
Any advice is greatly appreciated.
if(plot.ind==TRUE) {
#ptm <- Sys.time()
message("No trelliscope individual plots are generated due to the archived trelliscopejs package.")
ind <- act[!duplicated(act$ID),]
ind$activity <- ind$activity_sm <- NULL
#ind <- tibble::add_column(ind,panel = trelliscopejs::pmap_plot(list(ind$ID,ind$activity_ind,
# ind$activity_all,smband,plot.ori,plot.sm), ind_plot))
#message(paste("Total time: ",round(difftime(Sys.time(),ptm,units="mins")[[1]],2)," mins",sep=""))
## trelliscope plot
#if(plot.tre==TRUE) {
# ind$activity_ind <- ind$activity_all <- NULL
# if(is.null(plot.tre.path)) {
# trelliscopejs::trelliscope(ind,name = "Individual Mean Activity Plot", nrow = 2, ncol = 2,
# path=getwd())
# } else {
# trelliscopejs::trelliscope(ind,name = "Individual Mean Activity Plot", nrow = 2, ncol = 2,
# path=plot.tre.path)
# }
#} else {
# return(ind)
#}
if(plot.tre==TRUE) {
print("plot.tre=TRUE but no plot is being generated due to the archived trelliscopejs package.")
}
return(ind)
} else {
## auxillary information for plotting: y-axis activity max
act <- tibble::add_column(act,activity_max = ind_to_day(unlist(lapply(split(act$activity_sm,act$ID),function(x)
max(unlist(lapply(x,max))))),act))
## generate plot: day observation
#ptm <- Sys.time()
message("No trelliscope individual plots are generated due to the archived trelliscopejs package.")
#act <- tibble::add_column(act,panel = trelliscopejs::pmap_plot(list(id=act$ID,id_Nday=act$ID_Nday,
# act_ori=act$activity,act_ind=act$activity_ind,
# act_all=act$activity_all,act_max=act$activity_max,
# band=smband,ori=plot.ori,lw=plot.sm), act_plot))
#message(paste("Total time: ",round(difftime(Sys.time(),ptm,units="mins")[[1]],3)," mins",sep=""))
#check memory: format(object.size(act),units="Mb",standard="legacy")
## trelliscope plot
#if(plot.tre==TRUE) {
# act$activity <- act$activity_sm <- act$activity_ind <- act$activity_all <- NULL
# if(is.null(plot.tre.path)) {
# trelliscopejs::trelliscope(act,name = "Daily Activity Plot", nrow = 2, ncol = 2,
# path=getwd())
# } else {
# trelliscopejs::trelliscope(act,name = "Day Activity Plot", nrow = 2, ncol = 2,
# path=plot.tre.path)
# }
#} else {
# return(act)
#}
if(plot.tre==TRUE) {
print("plot.tre=TRUE but no plot is being generated due to the archived trelliscopejs package.")
}
return(act)
}
trelliscopejs_0.1.14.tar.gz | 2018-10-14 17:30 | 514K | trelliscopejs_0.1.18.tar.gz | 2019-01-09 07:20 | 514K
Dear Jian,
Thank you for your information on trelliscopejs. I am not sure why the administrator asked me to remove trelliscopejs related functions if there are new updates. The PML function is also supported by the new trelliscopejs package so you do not need to go back to the old versions.
The error message for the tre function is only hardcoded in PML 1.2, and it should work in PML 1.1 (I just double-checked PML 1.1). Maybe you could try running it again using PML 1.1 (the only difference between 1.1 and 1.2 is whether trelliscopejs related functions are removed or not)?
Many thanks.
Best, Xinyue
Thanks much Xinyue.
1) Yes PML 1.1 works great with trelliscopejs 0.2.4 (the latest version released on Feb. 10, 2020).
2) the CRAN PML 1.2 still has the trelliscopejs hard coded part as you know. So you may want to fix that at some point but I am fine with PML 1.1
3) As far as the PML 1.2 (master branch) you pushed to github, it has the same problem as I reported yesterday in the github (PML 1.1 master branch). Please note the lis3 is the example comes with the package. Since form(lis3) appears to be fine with the cran PML 1.2, I think this is a problem with the github version for both 1.1 and 1.2.
data(lis3) pa3 <- form(lis3) Error: Column
activity
must be length 1 (the group size), not 13
Following is the traceback:
stop(structure(list(message = "Column activity must be length 1 (the group size), not 13", call = NULL, cppstack = NULL), class = c("Rcpp::exception", "C++Error", "error", "condition"))) |
---|
stop(structure(list(message = "Column activity must be length 1 (the group size), not 13", call = NULL, cppstack = NULL), class = c("Rcpp::exception", "C++Error", "error", "condition"))) |
---|
Xinyue,
I noticed in the github form.R you have: act <- dplyr::mutate(act,activity=liscol2) this gives the error message Error: Column activity must be length 1 (the group size), not 13
But in the cran form.R you have: act <- tibble::add_column(act, activity = liscol2)
And in other tre() on github, I think similar happens.
Dear Jian,
Thank you very much for letting me know. I just noticed that I did not upload the new version successfully and just uploaded it again. Many thanks for pointing it out!
Best, Xinyue
From: Jian Wang notifications@github.com Sent: Thursday, 7 May 2020 9:34 AM To: xinyue-L/PML PML@noreply.github.com Cc: Dr. LI Xinyue xinyueli@cityu.edu.hk; Mention mention@noreply.github.com Subject: Re: [xinyue-L/PML] vignettes visualization section examples don't work (#2)
Xinyue,
I noticed in the github form.R you have: act <- dplyr::mutate(act,activity=liscol2) this gives the error message Error: Column activity must be length 1 (the group size), not 13
But in the cran form.R you have: act <- tibble::add_column(act, activity = liscol2)
And in other tre() on github, I think similar happens.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/xinyue-L/PML/issues/2#issuecomment-624977955, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM5JFAUO32G6MTDKONPJBPDRQIFZ7ANCNFSM4MZJFIYA.
Disclaimer: This email (including any attachments) is for the use of the intended recipient only and may contain confidential information and/or copyright material. If you are not the intended recipient, please notify the sender immediately and delete this email and all copies from your system. Any unauthorized use, disclosure, reproduction, copying, distribution, or other form of unauthorized dissemination of the contents is expressly prohibited.
Hi @xinyue-L, It seems none of the examples in the visualization section of this vignettes work with the PML 1.2 https://cran.r-project.org/web/packages/PML/vignettes/PML.html
R 3.6.3 trelliscopejs_0.2.4 PML_1.2
Thanks much for any insight?