[R] cannot dyn.load dll from path

Adrian Dragulescu adrian_d at eskimo.com
Thu Jan 19 17:19:04 CET 2012


Hello,

I'm on Windows, and according to the documentation R searches along the 
search path when looking for dll's for dyn.load.

For illustration, I've copied the XML.dll from package XML in the C:/Temp 
folder

   if (file.exists("C:/Temp/XML.dll")) {
     Sys.setenv(path = paste("C:/Temp;", Sys.getenv("path"), sep=""))
     dyn.load("XML.dll")   # doesn't find it!
   }


   head(strsplit(Sys.getenv("path"), ";")[[1]])  # C:/Temp is there

   dyn.load("C:/Temp/XML.dll")  # works fine

Am I misreading the documentation?

Thank you,
Adrian

> sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: i386-pc-mingw32/i386 (32-bit)

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
>



More information about the R-help mailing list