Hi,
On 10/24/2014 06:58 AM, S Ellison wrote:
Also note that these warnings or errors are complaining that the
number of items to replace (left length) is not a multiple of
replacement length (right length). This suggests that when the left
length is a multiple of the right length, everything is
> > Also note that these warnings or errors are complaining that the
> > number of items to replace (left length) is not a multiple of
> > replacement length (right length). This suggests that when the left
> > length is a multiple of the right length, everything is fine.
> > And this is actually t
On Oct 24, 2014 1:59 AM, "Hervé Pagès" wrote:
>
> Hi Henrik,
>
>
> On 10/23/2014 08:10 PM, Henrik Bengtsson wrote:
>>
>> Assigning one or more values to a vector/matrix/array x for which
>> length(x) == 0 gives no error, e.g.
>>
>>> x <- integer(0)
>>> x[] <- 1:2
>>
>>
>>> x <- matrix(nrow=0, ncol
Hi Henrik,
On 10/23/2014 08:10 PM, Henrik Bengtsson wrote:
Assigning one or more values to a vector/matrix/array x for which
length(x) == 0 gives no error, e.g.
x <- integer(0)
x[] <- 1:2
x <- matrix(nrow=0, ncol=1)
x[] <- 1:2
x[,1] <- 1:2
x <- array(dim=c(0,1,1))
x[] <- 1:2
x[,1,1] <- 1
Assigning one or more values to a vector/matrix/array x for which
length(x) == 0 gives no error, e.g.
> x <- integer(0)
> x[] <- 1:2
> x <- matrix(nrow=0, ncol=1)
> x[] <- 1:2
> x[,1] <- 1:2
> x <- array(dim=c(0,1,1))
> x[] <- 1:2
> x[,1,1] <- 1:2
whereas
> x <- integer(1)
> x[] <- 1:2
Warning