[R] Trouble loading package
Uwe Ligges
ligges at statistik.tu-dortmund.de
Fri Apr 2 19:40:32 CEST 2010
On 28.03.2010 21:20, Peter Ehlers wrote:
> 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!
Let me add:
Please note that such code could cannot pass R CMD check. In other
words, the authors either ignored the error or never checked their
package. Such a package could not be shipped through CRAN, for example.
Please use the package checks. They are really useful.
Best,
Uwe Ligges
> -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.
>>
>>
>
More information about the R-help
mailing list