Is this a bug?
> f1 <- factor(c("a", NA), levels = c("a", "NA") )
> f2 <- f1[, drop = TRUE]
> f2
[1] a
Levels: a
I would have expected f2 to have only one level, "a". It seems
to me that the code in [.factor does not follow the advice in
help("factor") on how to set factor co
The documentation for lm() indicates that the 'qr' component of an
lm object is optional. But some functions do not behave well when
this component is absent: summary() gives an error and predict()
returns all zeroes.
Example:
> x <- 1:10; y <- x^2
> mm <- lm(y~x, qr=FALSE)
> summary(m
> addmargins(UCBAdmissions, FUN = list(Total=sum))
works with no problems, but consider:
> myFUN <- list(Total=sum)
> addmargins(UCBAdmissions, FUN = myFUN)
Error in "names<-.default"(`*tmp*`, value = "") :
names() applied to a non-vector
Is this a bug?
> R.version
_
pla
The documentation for tempdir() and tempfile() on R-2.2.1 for Windows
says that "Both will use backslash as the path separator", but in
practice I see a forward slash:
> tempdir()
[1] "C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp/RtmpGqB7ob"
> tempfile()
[1] "C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Te
The maximum length of a character string returned by strwrap,
i.e. max(nchar(strwrap(x,width))), never in my experience exceeds
width-2 (unless x contains a word that is longer than this).
This is not exactly a bug -- width is described only as a "target
column for wrapping lines" -- but seems odd.
> qgamma(1,1.1)
[1] Inf
as expected. But for shape parameter between 0.16 and 1:
> qgamma(1,.5)
[1] NaN
Warning message:
NaNs produced in: qgamma(p, shape, scale, lower.tail, log.p)
and for shape parameter 0.16 or less:
> qgamma(1,.1)
[1] 99.42507
Arguments close to 1
Gabor Grothendieck wrote:
> On 6/30/05, J. Hosking <[EMAIL PROTECTED]> wrote:
>
...
>> I keep a separate directory ...\R\library for nonstandard packages,
>> with environment variable R_LIBS set to the directory name.
>
>
> Do you mean your R_LIBS has two
Gabor Grothendieck wrote:
> When I install a new version of R (Windows XP) I have to:
>
> 1. copy my rw\etc\Rprofile.site file to the new installation
>
> 2. copy the rw\share\texmf files to the tex subfolder of the
>miktex root directory and then refresh the miktex name database
>