Re: [<-.
It is perhaps worth noting that the OP seems "misguided" in another sense.
His complaint seems to rest on the assumption that because matrices and
data frames both have a row/column structure, certain operations on them
should be similar. I disagree. In fact, data frames and matrices are
Hello Folks
I am working some R package development. When I was using ggplot
inside of the function, I need to get the output graph's legend must be
corresponding to the input parameters numerical value (need to be automatically
changed when we input different parameters). Theref
The subject is misguided. It is not a problem to assign to a subset of columns.
The issue is that the assignment operation does not want to _expand_ the matrix
automatically upon seeing an out-of-bounds index. E.g.:
> M <- matrix(0,2,2)
> M[,3]<-1
Error in `[<-`(`*tmp*`, , 3, value = 1) : subsc
Hello David,
On Sat, 23 Nov 2019 11:58:42 -0500
David Disabato wrote:
> For example, if I want to add a new column to a data.frame, I can do
> something like `myDataFrame[, "newColumn"] <- NA`.
Arguably, iterative growth of data structures is not the "R style",
since it may lead to costly rea
4 matches
Mail list logo