Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`magrittr` namespace issue? #218

Closed
jsta opened this Issue Aug 14, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@jsta
Copy link

jsta commented Aug 14, 2015

I get the following error when running
demo("spades-simulation", package="SpaDES")

Error in normPath(path) : could not find function "%>%"

Here is my sessionInfo()

R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 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] SpaDES_1.0.1
loaded via a namespace (and not attached):
[1] ffbase_0.12.1 reshape2_1.4.1 lattice_0.20-31
[4] tcltk_3.2.1 colorspace_1.2-6 htmltools_0.2.6
[7] mgcv_1.8-6 chron_2.3-47 archivist_1.5
[10] R.oo_1.19.0 DBI_0.3.1 R.utils_2.1.0
[13] CircStats_0.2-4 sp_1.1-0 secr_2.9.5
[16] plyr_1.8.3 stringr_1.0.0 munsell_0.4.2
[19] gtable_0.1.2 raster_2.3-40 R.methodsS3_1.7.0
[22] htmlwidgets_0.5 memoise_0.2.1 ff_2.2-13
[25] httpuv_1.3.3 DiagrammeR_0.7 parallel_3.2.1
[28] proto_0.3-10 Rcpp_0.12.0 xtable_1.7-4
[31] scales_0.2.5 fpCompare_0.2.0 abind_1.4-3
[34] mime_0.3 bit_1.1-12 fastmatch_1.0-4
[37] ggplot2_1.0.1 digest_0.6.8 stringi_0.5-5
[40] dplyr_0.4.2 shiny_0.12.2 grid_3.2.1
[43] tools_3.2.1 bitops_1.0-6 magrittr_1.5
[46] RCurl_1.95-4.7 RSQLite_1.0.0 Matrix_1.2-1
[49] MASS_7.3-40 gridBase_0.4-7 data.table_1.9.4
[52] downloader_0.4 RandomFieldsUtils_0.0.10 RandomFields_3.1.1
[55] lubridate_1.3.3 assertthat_0.1 httr_1.0.0
[58] rstudioapi_0.3.1 R6_2.1.0 boot_1.3-16
[61] igraph_0.7.1 nlme_3.1-120 compiler_3.2.1

@jsta

This comment has been minimized.

Copy link
Author

jsta commented Aug 14, 2015

The demo runs the following code prior to the error:

#' SpaDES simulation demo
#'
#' randomLandscapes, caribouMovement, fireSpread
#'

@demoTitle spades-simulation

library("SpaDES")

filelist = data.frame(

  • files=dir(file.path(
  • find.package("SpaDES", lib.loc=.libPaths(), quiet=FALSE), "maps"),
    
  • full.names=TRUE, pattern= "tif"),
    
  • functions="rasterToMemory",
  • packages="SpaDES",
  • stringsAsFactors=FALSE)

stackName = "landscape"

mySim <- simInit(

  • times=list(start=0.0, end=100.00),
  • params=list(
  • .progress=list(type="text", interval = 10),
    
  • .globals=list(stackName=stackName, burnStats="nPixelsBurned"),
    
  • randomLandscapes = list(nx=1e2, ny=1e2, .saveObjects=stackName,
    
  •                         .plotInitialTime=NA, .plotInterval=NA,
    
  •                         inRAM=TRUE),
    
  • caribouMovement=list(N=1e2, .saveObjects=c("caribou"),
    
  •                      .plotInitialTime = 1.01, .plotInterval=1,
    
  •                      moveInterval=1),
    
  • fireSpread=list(nFires = 1e1, spreadprob=0.235,
    
  •                 persistprob=0, its=1e6,
    
  •                 .plotInitialTime = 0.1, .plotInterval=10,
    
  •                 returnInterval=10, startTime=0)
    
  • ),
    
  • #modules=list("randomLandscapes", "fireSpread", "caribouMovement"),
  • modules=list("fireSpread", "caribouMovement"),
  • inputs=filelist,
  • paths=list(modulePath=system.file("sampleModules", package="SpaDES"))
  • )
@eliotmcintire

This comment has been minimized.

Copy link
Contributor

eliotmcintire commented Aug 14, 2015

You need to update igraph to version >1.0 . It has the pipe operator.

@eliotmcintire

This comment has been minimized.

Copy link
Contributor

eliotmcintire commented Aug 14, 2015

Whoops. Nope, I was wrong. I have pushed the bugfix to development. It needs a library call to igraph inside the demo.
You will need igraph updated for other purposes, however.

@achubaty

This comment has been minimized.

Copy link
Contributor

achubaty commented Aug 14, 2015

@eliotmcintire's fix is commit c7e832a

achubaty added a commit that referenced this issue Aug 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.