christianparobek / skeleSim

Null models, performance testing, and power estimation with population simulations
3 stars 6 forks source link

Object masking from packages #68

Closed AH95250 closed 7 years ago

AH95250 commented 7 years ago

Hi there, I am new to R and I am keen to use the SkeleSim package but currently I am having the following problems. When I load SkeleSim I get the following:

library(skeleSim) Loading required package: igraph

Attaching package: ‘igraph’

The following objects are masked from ‘package:stats’:

decompose, spectrum

The following object is masked from ‘package:base’:

union

Loading required package: shiny Loading required package: shinyFiles

skeleSimGUI()

Attaching package: ‘dplyr’

The following objects are masked from ‘package:igraph’:

%>%, as_data_frame, groups, union

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Need help? Try the ggplot2 mailing list: http://groups.google.com/group/ggplot2.

Listening on http://127.0.0.1:4313

Is the masking of objects a problem? Also when I try to run the simulation a black screen appears briefly and then disappears, when I import the simulation file it has all the options I selected on all the tabs but the results screen is blank. Is there a way for me to fix this or am I doing something wrong?

Thanks

EricArcher commented 7 years ago

The masking shouldn't be a problem, or at a minimum unlikely to be related to the problem you are seeing. Can you tell us more about the system you are running on? What is the output of sessionInfo() from the R console?

AH95250 commented 7 years ago

I am running on a HP computer that was originally windows 7 and has been updated to windows 10.

sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ggplot2_2.2.1 dplyr_0.5.0 skeleSim_0.9.5 shinyFiles_0.6.2 [5] shiny_1.0.0 igraph_1.0.1

loaded via a namespace (and not attached): [1] nlme_3.1-128 hierfstat_0.04-22 gmodels_2.16.2
[4] RColorBrewer_1.1-2 numDeriv_2016.8-1 tools_3.3.2
[7] backports_1.0.5 R6_2.2.0 vegan_2.4-2
[10] rpart_4.1-10 Hmisc_4.0-2 DBI_0.5-1
[13] lazyeval_0.2.0 mgcv_1.8-15 colorspace_1.3-2
[16] permute_0.9-4 ade4_1.7-5 nnet_7.3-12
[19] sp_1.2-4 gridExtra_2.2.1 phangorn_2.1.1
[22] pspline_1.0-17 htmlTable_1.9 strataG_1.0.5
[25] scales_0.4.1 checkmate_1.8.2 mvtnorm_1.0-5
[28] quadprog_1.5-5 spatstat_1.48-0 goftest_1.0-4
[31] stringr_1.1.0 digest_0.6.12 foreign_0.8-67
[34] base64enc_0.1-3 htmltools_0.3.5 pegas_0.9
[37] stabledist_0.7-1 ADGofTest_0.3 maps_3.1.1
[40] htmlwidgets_0.8 jsonlite_1.2 gtools_3.5.0
[43] acepack_1.4.1 spdep_0.6-9 magrittr_1.5
[46] Formula_1.2-1 apex_1.0.2 Matrix_1.2-7.1
[49] Rcpp_0.12.9 munsell_0.4.3 abind_1.4-5
[52] ape_4.0 stringi_1.1.2 MASS_7.3-45
[55] RJSONIO_1.3-0 plyr_1.8.4 grid_3.3.2
[58] parallel_3.3.2 gdata_2.17.0 adegenet_2.0.1
[61] deldir_0.1-12 lattice_0.20-34 splines_3.3.2
[64] tensor_1.5 knitr_1.15.1 swfscMisc_1.2
[67] boot_1.3-18 seqinr_3.3-3 markdown_0.7.7
[70] reshape2_1.4.2 stats4_3.3.2 fastmatch_1.1-0
[73] LearnBayes_2.15 latticeExtra_0.6-28 data.table_1.10.4
[76] mapdata_2.2-6 httpuv_1.3.3 gtable_0.2.0
[79] polyclip_1.5-6 assertthat_0.1 mime_0.5
[82] xtable_1.8-2 rmetasim_3.0.5 coda_0.19-1
[85] survival_2.40-1 pcaPP_1.9-61 gsl_1.9-10.3
[88] tibble_1.2 copula_0.999-16 cluster_2.0.5

AH95250 commented 7 years ago

I am working through the running a forecasting simulation in skeleSim vignette. Everything works fine apart from the final run simulation and view results step. I get the same problem when following the choosing sample size vignette.

stranda commented 7 years ago

After running the simulation, can you find output files in the folder that you set using "Set Simulation Root Directory" on the "Actions" tab?

AH95250 commented 7 years ago

Yes, I get a .params and .script file in my simulation root directory. Both hold my parameters I set when loaded into skelesim but I do not have any results.  

On Friday, 10 February 2017 2:39 AM, stranda <notifications@github.com> wrote:

After running the simulation, can you find output files in the folder that you set using "Set Simulation Root Directory" on the "Actions" table?— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

AH95250 commented 7 years ago

I am not to sure if this is any help but I have tried to get skeleSim to work on three other windows computers (running on windows 7 and 10) and a macbook pro in the hopes that it would be a windows problem but I get the same problem each time as well as the masking that was mention earlier. Each time I have downloaded R x64 3.3.2 and Rstudio 1.0.136 and Fastsimcoal2. I have downloaded skeleSim and associated packages through the installer tab on Rstudio. I follow the steps on the running forecasting simulations vignette, all the parameters work and save accordingly. for some reason when I click run the simulation starts for a brief second then stops and saves a file in my simulation root directory that contain my specified parameters but no results.  I have also tried to use skeleSim through R instead of Rstudio. When I click run I do not get the black box appearing briefly but instead I get an error message pop up that says the following: Windows cannot find 'R'. Make sure you typed the name correctly, and then try again. - This produces a file in my simulation root directory with my parameters saved on it but no results like when using Rstudio.  

On Friday, 10 February 2017 2:39 AM, stranda <notifications@github.com> wrote:

After running the simulation, can you find output files in the folder that you set using "Set Simulation Root Directory" on the "Actions" table?— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

stranda commented 7 years ago

Sorry about the problems your are having,

Is there an *.Rout file produced? If so, could you include in this thread?

thanks, allan

AH95250 commented 7 years ago

No worries its all part of it, yes I do have a ROUT file, I will add what it says below.  R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"Copyright (C) 2016 The R Foundation for Statistical ComputingPlatform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY.You are welcome to redistribute it under certain conditions.Type 'license()' or 'licence()' for distribution details.   Natural language support but running in an English locale R is a collaborative project with many contributors.Type 'contributors()' for more information and'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or'help.start()' for an HTML browser interface to help.Type 'q()' to quit R.

library(skeleSim)Loading required package: igraph Attaching package: 'igraph' The following objects are masked from 'package:stats':     decompose, spectrum The following object is masked from 'package:base':     union Loading required package: shinyLoading required package: shinyFiles> library(adegenet)Loading required package: ade4    /// adegenet 2.0.1 is loaded ////////////    > overview: '?adegenet'   > tutorials/doc/questions: 'adegenetWeb()'    > bug reports/feature requests: adegenetIssues()

getwd()[1] "C:/Users/Alex/Documents/R/win-library/3.3/skeleSim/shiny/skeleSimShinyGUI"> setwd('C:/Users/Alex/Documents/R')> getwd()[1] "C:/Users/Alex/Documents/R"> load('Connect_or_not.20170215.1437.2230.params.rdata')> ls()[1] "ssClass"> ssClass <- runSim(ssClass)[1] 1[1] "sequence"   0   1   2   3 525 525 525 525 [1] "simulate for  50 years"[1] "was able to simulate a rmetasim landscape"[multidna constructor] missing/incomplete labels provided - using generic labels. [1] "returned from convert; returning params obj"  Global analysis...  Locus analysis...Error in summary(loc.g)$strata.smry :   $ operator is invalid for atomic vectorsCalls: runSim ... locusAnalysisHaplotypes -> hapSmryFunc -> t -> sapply -> lapply -> FUNExecution halted

On Wednesday, 15 February 2017 6:49 AM, stranda <notifications@github.com> wrote:

Sorry about the problems your are having,Is there an *.Rout file produced? If so, could you include in this thread?thanks, allan— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

EricArcher commented 7 years ago

I echo Alan's apologies for the problems. I might know what this is, but it'll take me a day to verify. I'll let you know what I find.

Cheers, Eric

On Tue, Feb 14, 2017 at 5:43 PM AH95250 notifications@github.com wrote:

No worries its all part of it, yes I do have a ROUT file, I will add what it says below. R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"Copyright (C) 2016 The R Foundation for Statistical ComputingPlatform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY.You are welcome to redistribute it under certain conditions.Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors.Type 'contributors()' for more information and'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or'help.start()' for an HTML browser interface to help.Type 'q()' to quit R.

library(skeleSim)Loading required package: igraph Attaching package: 'igraph' The following objects are masked from 'package:stats': decompose, spectrum The following object is masked from 'package:base': union Loading required package: shinyLoading required package: shinyFiles> library(adegenet)Loading required package: ade4 /// adegenet 2.0.1 is loaded //////////// overview: '?adegenet' > tutorials/doc/questions: 'adegenetWeb()' bug reports/feature requests: adegenetIssues()

getwd()[1] "C:/Users/Alex/Documents/R/win-library/3.3/skeleSim/shiny/skeleSimShinyGUI"> setwd('C:/Users/Alex/Documents/R')> getwd()[1] "C:/Users/Alex/Documents/R"> load('Connect_or_not.20170215.1437.2230.params.rdata')> ls()[1] "ssClass"> ssClass <- runSim(ssClass)[1] 1[1] "sequence" 0 1 2 3 525 525 525 525 [1] "simulate for 50 years"[1] "was able to simulate a rmetasim landscape"[multidna constructor] missing/incomplete labels provided - using generic labels. [1] "returned from convert; returning params obj" Global analysis... Locus analysis...Error in summary(loc.g)$strata.smry : $ operator is invalid for atomic vectorsCalls: runSim ... locusAnalysisHaplotypes -> hapSmryFunc -> t -> sapply -> lapply -> FUNExecution halted

On Wednesday, 15 February 2017 6:49 AM, stranda notifications@github.com wrote:

Sorry about the problems your are having,Is there an *.Rout file produced? If so, could you include in this thread?thanks, allan— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/christianparobek/skeleSim/issues/68#issuecomment-279893417, or mute the thread https://github.com/notifications/unsubscribe-auth/AEoTS7Gx0Jm47O2JF9NPqSPeFolAmfI6ks5rclhYgaJpZM4L7blb .

--


Eric Archer, Ph.D.

Southwest Fisheries Science Center (NMFS/NOAA) 8901 La Jolla Shores Drive La Jolla, CA 92037 USA 858-546-7121 (work) 858-546-7003 (FAX)

Marine Mammal Genetics Group: swfsc.noaa.gov/mmtd-mmgenetics GitHub: github/ericarcher

&

Adjunct Professor, Marine Biology Scripps Institution of Oceanography University of California, San Diego http://profiles.ucsd.edu/frederick.archer

"

The universe doesn't care what you believe. The wonderful thing about science is that it doesn't ask for your faith, it just asks for your eyes." - Randall Munroe

"Lighthouses are more helpful than churches."

EricArcher commented 7 years ago

I have looked at the code where this error is occurring, but don't see a logic bug that could be causing it. Would you send/attach the parameter workspace file that the simulation is using so I can test that directly?

AH95250 commented 7 years ago

Below I have attached the parameters file.

On Thursday, 16 February 2017 7:30 AM, Eric Archer <notifications@github.com> wrote:

I have looked at the code where this error is occurring, but don't see a logic bug that could be causing it. Would you send/attach the parameter workspace file that the simulation is using so I can test that directly?— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

EricArcher commented 7 years ago

Sorry, but it doesn't look like the file got attached. Could you try again - attach it by dragging and dropping to the comment window in the Issues page on GitHub rather than attach via email. Thanks!

AH95250 commented 7 years ago

Sorry for the delay, I have attached the parameter file below as a zip file because Github would not accept the original file.

Connect_or_not.20170215.1437.2230.params.zip

AH95250 commented 7 years ago

Attached below are all the files that are produced when I running forecasting simulations vignette.

Connect or not out puts from SkeleSim.zip

EricArcher commented 7 years ago

Thanks! I'll take a look at it and see what I can find.

EricArcher commented 7 years ago

Found the bug: For some reason, the wrong form of the summary function was being now being used in the hapSmryFunc. Previously it was using the correct form from strataG, but now it was using base::summary???? Tested and works now.

AH95250 commented 7 years ago

Thank you for helping me and sorting this out. I appreciate the time you have spent to resolve the issues and I look forward to using skeleSim in the future.