Closed paternogbc closed 6 years ago
Hey @gijsbertwerner , I got the following error when trying to run model = "BM" in tree_continous:
#' #Load data:
data("primates")
#' #Model trait evolution accounting for phylogenetic uncertainty
adultMass<-primates$data$adultMass
names(adultMass)<-rownames(primates$data)
tree_cont<-tree_continuous(data = adultMass,phy = primates$phy,
model = "BM",n.tree=10,n.cores = 2,track = TRUE)
Error or in data.frame(j, sigsq, optpar, z0, aicc, stringsAsFactors = F) :
object 'optpar' not found
Should I just include the following line of code to fix the issue?:
if (model == "BM"){optpar <- NA}
Or the model BM is trully not possible?
Hey @caterinap the following error still occurring?
Linux checks all good now:
Status: OK
R CMD check results
0 errors | 0 warnings | 0 notes
@paternogbc Yes, still get the error (after pulling/building):
* installing *source* package 'sensiPhy' ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'geiger'
ERROR: lazy loading failed for package 'sensiPhy'
* removing 'C:/Users/penone/Documents/sensiPhy.Rcheck/sensiPhy'
Thanks a lot Caterina! This is so wierd. I have checked in Linux and Windows. Are you using which system?
I will do some additional tests and get back here. If you find anything else just drop a messege :)
Cheers
On Thu, 7 Dec 2017 at 20:34 Caterina Penone notifications@github.com wrote:
Yes, still get the error (after pulling/building):
- installing source package 'sensiPhy' ... R data * moving datasets to lazyload DB preparing package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called 'geiger' ERROR: lazy loading failed for package 'sensiPhy'
- removing 'C:/Users/penone/Documents/sensiPhy.Rcheck/sensiPhy'
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/paternogbc/sensiPhy/issues/176#issuecomment-349912902, or mute the thread https://github.com/notifications/unsubscribe-auth/AJMWOd75ctzZDGVonRm5_RTwxLNHwkckks5s97EJgaJpZM4Q3xF7 .
--
email : paternogbc@gmail.com Google Citations: https://scholar.google.com/citations?user=uNxyHMkAAAAJ&hl=pt-BR https://scholar.google.com/citations?user=uNxyHMkAAAAJ&hl=pt-BR Research Gate: https://www.researchgate.net/profile/Gustavo_Paterno2 https://www.researchgate.net/profile/Gustavo_Paterno2 Github: https://github.com/paternogbc Blog : www.Raprendiz.wordpress.com Skype : gustavopaterno Lattes: http://lattes.cnpq.br/3661227833522004
I am on:
This discussion at stackoverflow (https://stackoverflow.com/questions/31717850/error-package-or-namespace-load-failed-for-ggplot2-and-for-data-table) might help. But it would be very important to ensure that others users dont face the same issue when trying to install.
hey @caterinap , could you try this please:
devtools::install_github(username = "paternogbc", repo = "sensiPhy")
I think the problem is if you dont have geiger in the correct version in your computer, then you try to install and compile sensiPhy from the source (you dont have a geiger which is a dependency) it givis this error. I just removed geiger and tried to install the package again (from the R studio build buttom) and got the following message:
- installing to library ‘/home/paterno/R/x86_64-pc-linux-gnu-library/3.4’ ERROR: dependency ‘geiger’ is not available for package ‘sensiPhy’
- removing ‘/home/paterno/R/x86_64-pc-linux-gnu-library/3.4/sensiPhy’ Exited with status 1.
When installing from github it install without error, then the install and restart button from rstudio works again.
A second test supports this behavior. I Manually removed "ape" from my computer and tried to build and install sensiPhy from source and got the following:
- installing to library ‘/home/paterno/R/x86_64-pc-linux-gnu-library/3.4’ ERROR: dependency ‘ape’ is not available for package ‘sensiPhy’
- removing ‘/home/paterno/R/x86_64-pc-linux-gnu-library/3.4/sensiPhy’ Exited with status 1.
Hey @paternogbc , I got the exact same error than before even installing from git.
Also tried to uninstall / reinstall geiger
.
Might come from my PC here, I'll try on my laptop later..
OK, it seemed to be a problem linked to the folder where the packages were stored, I moved all of them to a new folder and now it's working. @paternogbc sorry that you lost time with that!. And the good news are...
Status: OK
R CMD check results
0 errors | 0 warnings | 0 notes
👍 👍 👍 👍 👍
Good catch, @paternogbc (this is about the BM-error in tree_continous). Yes, this should be possible, it's a mistake. I have now fixed it in https://github.com/paternogbc/sensiPhy/commit/2f495ea15d73eb069dd893ccdf940f655de2459f (just pushed to master).
Will now try the R error checking on my mac!
Ok, it's generally looking good with me, but finding one warning:
Examples with CPU or elapsed time > 5s user system elapsed intra_samp_phyglm 19.438 1.623 21.183 tree_samp_phyglm 18.518 1.520 20.136 influ_phyglm 9.732 0.724 10.507 tree_influ_phyglm 8.184 0.713 8.947 tree_phyglm 6.013 0.441 6.477 intra_influ_phyglm 5.635 0.447 6.102
Status: 1 WARNING See ‘/private/var/folders/hf/l8d53qrx3kd6n456fhfb27sw0000gn/T/Rtmp7WzWXX/sensiPhy.Rcheck/00check.log’ for details.
R CMD check results 0 errors | 1 warning | 0 notes checking whether package ‘sensiPhy’ can be installed ... WARNING Found the following significant warnings: Warning: package ‘ape’ was built under R version 3.4.2
This is on:
So I suppose the ape-warning has to do with that I am one R-version behind, so it should probably not matter too much..
Yes, updating R solves it: Examples with CPU or elapsed time > 5s user system elapsed intra_samp_phyglm 18.846 1.609 20.533 tree_samp_phyglm 18.765 1.581 20.437 influ_phyglm 10.361 0.788 11.298 tree_influ_phyglm 7.743 0.648 8.403 tree_phyglm 6.032 0.460 6.658 intra_influ_phyglm 5.653 0.449 6.127
Status: OK
R CMD check results 0 errors | 0 warnings | 0 notes
One thing I did notice is this message when loading the package:
Updating sensiPhy documentation Loading sensiPhy Loading required package: ape Loading required package: phylolm Loading required package: ggplot2
Should this now not also include 'geiger'?
Awesome guys (@caterinap , @gijsbertwerner) thanks for one more round of review and improvements !!! We are nearly there =) :1st_place_medal:
I will continue to do some other tests along the next days and my plan is to submit the package to CRAN next week (so we still have time to find any other issue).
@gijsbertwerner, we dont need to include geiger or phytools as dependence because we only use one / two functions from these packages. We are importing this package instead of depending on them. If later we start to use much more functions we can always re-think the approach. It is a bit confusing I must confess and I struggle a bit with these decisions. Good source of advice can be found below (we can also discuss and change the dependencies :) :
Hadley advice: http://r-pkgs.had.co.nz/description.html Stackoverflow discussion: https://stackoverflow.com/questions/8637993/better-explanation-of-when-to-use-imports-depends
We are done with the CRAN checking. All good! =) If you find anything let me know. I am just preparing notes to CRAM and other small tests before submission. I plan to submit the package to CRAN at the 14th of DEC.
Cool, will try and break it as much as possible before that!
Dr. Gijsbert Werner Newton Fellow, Department of Zoology Junior Research Fellow, Balliol College University of Oxford
Balliol College Broad Street Oxford OX1 3BJ United Kingdom
On 12 Dec 2017, at 01:20, Gustavo Paterno notifications@github.com<mailto:notifications@github.com> wrote:
We are done with the CRAN checking. All good! =) If you find anything let me know. I am just preparing notes to CRAM and other small tests before submission. I plan to submit the package to CRAN at the 14th of DEC.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/paternogbc/sensiPhy/issues/176#issuecomment-350913683, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGauyPltmkOnfbKGMRYA62FKF8kQBWQhks5s_dTMgaJpZM4Q3xF7.
Anything we find wrong or need to be done, please lets post here =) We could follow Caterina style (and check things when they are done).
Remember to always pull and re-build the package before testing. =)
[x] Correct example description in
clade
,influ
,samp
(both continuous and discrete):#Model trait evolution accounting for phylogenetic uncertainty
(replace with _influentialclades, influential species, sampling size )[x] When running check, got error: checking whether package 'sensiPhy' can be installed ... ERROR Installation failed.
[x] '::' or ':::' import not declared from: ‘geiger’
[x] Missing link or links in documentation object 'sensi_plot.sensiTree.TraitEvol.Rd': ‘[sensiPhy]{tree_fitDiscrete}’ ‘[sensiPhy]{tree_fitContinuous}’ See section 'Cross-references' in the 'Writing R Extensions' manual.
[x] checking R code for possible problems ... NOTE sensi_plot.sensiClade.TraitEvol: no visible binding for global variable ‘estimate’ sensi_plot.sensiClade.TraitEvol: no visible binding for global variable ‘model’ sensi_plot.sensiInflu.TraitEvol: no visible global function definition for ‘median’ sensi_plot.sensiSamp.TraitEvol: no visible binding for global variable ‘sigsq’ sensi_plot.sensiSamp.TraitEvol: no visible binding for global variable ‘q12’ sensi_plot.sensiSamp.TraitEvol: no visible binding for global variable ‘q21’ sensi_plot.sensiTree.TraitEvol: no visible global function definition for ‘median’ tree_continuous: no visible binding for global variable ‘median’ tree_continuous: no visible binding for global variable ‘sd’ tree_discrete: no visible binding for global variable ‘median’ tree_discrete: no visible binding for global variable ‘sd’ Undefined global functions or variables: estimate median model q12 q21 sd sigsq Consider adding importFrom("stats", "median", "sd") to your NAMESPACE file.
[x] checking Rd line widths ... NOTE
Rd file 'clade_discrete.Rd': \examples lines wider than 100 characters: clade_disc_2<-clade_discrete(data=primates$data,phy = primates$phy[[1]],model="ARD",transform="kappa",
Rd file 'influ_continuous.Rd': \examples lines wider than 100 characters:
Print summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter
Rd file 'influ_discrete.Rd': \examples lines wider than 100 characters:
Print summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter
Rd file 'samp_continuous.Rd': \examples lines wider than 100 characters:
Print summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter
Rd file 'samp_discrete.Rd': \examples lines wider than 100 characters:
Print summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter
Rd file 'tree_continuous.Rd': \examples lines wider than 100 characters:
Print summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter
Rd file 'tree_discrete.Rd': \examples lines wider than 100 characters:
Print summary statistics for the transitions rates, aic-values and (if applicable) optimisation parameter