Re: [Rd] A different error in sample()

2018-09-20 Thread lmo via R-devel
Although it seems to be pretty weird to enter a numeric vector of length one that is not an integer as the first argument to sample(), the results do not seem to match what is documented in the manual. In addition, the results below do not support the use of round rather than truncate in the doc

Re: [Rd] substitute() on arguments in ellipsis ("dot dot dot")?

2018-08-15 Thread lmo via R-devel
A potential solution, at least in terms of producing the desired output, is the base R function alist: > alist(1+2, "a", rnorm(3)) [[1]] 1 + 2 [[2]] [1] "a" [[3]] rnorm(3) > str(alist(1+2, "a", rnorm(3))) List of 3  $ : language 1 + 2  $ : chr "a"  $ : language rnorm(3) luke [[altern

[Rd] aggregate() naming -- bug or feature

2018-03-24 Thread lmo via R-devel
Be aware that the object that aggregate returns with bar() is more complicated than you think. str(aggregate(iris$Sepal.Length, by = list(iris$Species), FUN = bar)) 'data.frame':    3 obs. of  2 variables:  $ Group.1: Factor w/ 3 levels "setosa","versicolor",..: 1 2 3  $ x  : num [1:3, 1:2] 5.