[R] Trouble loading package
Peter Ehlers
ehlers at ucalgary.ca
Sun Mar 28 21:20:04 CEST 2010
I haven't seen an answer to this yet.
Your problem may stem from having defined a variable T.
I can replicate your error messages with:
T <- "hello"
library(RMark)
So methinks that this probably indicates that there may be
a problem with using T for TRUE (when will Rusers finally
stop doing that???).
And sure enough, after loading RMark (with no T in my
workspace), I find that the authors of RMark have replaced
base R's .First.lib with their own version which contains
the line:
info <- strsplit(library(help = pkgname, character.only = T)$info[[1]],
"\\:[ ]+")
Note to RMark authors (and others): get used to using
TRUE and FALSE. The few characters saved by using T/F
are not worth it!
-Peter Ehlers
On 2010-03-26 15:40, Glenn E Stauffer wrote:
> I am trying to load a package called Rmark, but when I run
>
> library(Rmark)
>
> I get the following:
>
>> library(RMark)
> Error in !character.only : invalid argument type
> Error in library(RMark) : .First.lib failed for 'RMark'
>
> When I try to load Rmark from the packages menu, I get:
>
>> local({pkg<- select.list(sort(.packages(all.available = TRUE)))
> + if(nchar(pkg)) library(pkg, character.only=TRUE)})
> Error in !character.only : invalid argument type
> Error in library(pkg, character.only = TRUE) :
> .First.lib failed for 'RMark'
>
> Any ideas what is causing this error?
>
> My OS is Windows XP, and my R version is R.2.10.1
>
> Thanks,
> Glenn
>
> *****************************************
> Glenn E. Stauffer
> Graduate Research Assistant
> Department of Ecology
> Montana State University
> Bozeman, MT 59717
> 406-994-5677
> gestauffer at gmail.com
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Peter Ehlers
University of Calgary
More information about the R-help
mailing list