[R] package MonteCarlo error: object 'packages' not found

john polo jpolo at mail.usf.edu
Thu Feb 15 20:39:43 CET 2018


R-users,

I can't tell what's causing the following error. The vignette does not 
make a reference to a "packages" option or parameter.

 > library(MonteCarlo)
Loading required package: abind
Loading required package: codetools
Loading required package: rlecuyer
Loading required package: snow
Loading required package: snowfall

 > infest_kud_fun<-function(x,A,B){
+   equation1=exp(A-(B*x))
+   return(list("equation1"=equation1))
+ }


 > x_grid<-c(0.5,10) #distances kudzu could grow
 > A_grid<-rnorm(1000) #probabilities
 > B_grid<- rnorm(1000) #probabilities


 > #put parameters in a list
 > param_list_kud=list("x"=x_grid, "A"=A_grid, "B"=B_grid)

 > #run MC simulation
 > 
MC_result_kud<-MonteCarlo(func=infest_kud_fun,nrep=10000,param_list=param_list_kud)
Error in MonteCarlo(func = infest_kud_fun, nrep = 10000, param_list = 
param_list_kud) :
   object 'packages' not found

 > sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

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] MonteCarlo_1.0.2  snowfall_1.84-6.1 snow_0.4-2 rlecuyer_0.3-4
[5] codetools_0.2-15  abind_1.4-5


best,

john

-- 
Enlightenment is ego's ultimate disappointment.
-Chogyam Trungpa



More information about the R-help mailing list