Well 'list' in R is pretty naturally the same as R's 'atomic vector' in
scads of languages. In R the term needs special care since it's still a
'vector'.
'Degenerate dimension' is probably a helpful phrase for understanding what
is happening here.
Cheers, Mike
On Saturday, July 4, 2015, Rolf Tur
Hi,
On Fri, Jul 3, 2015 at 10:33 AM, Zander, Joscha
wrote:
> Good day R-community,
>
> i just wondered if it is a bug or a feature...
>
> When i have a matrix "mat" with one column and i delete the last row with
>
> mat <- mat[-nrow(mat),] the result is a list.
I have no idea how you're getting
> On Jul 3, 2015, at 9:33 AM, Zander, Joscha wrote:
>
> Good day R-community,
>
> i just wondered if it is a bug or a feature...
>
> When i have a matrix "mat" with one column and i delete the last row with
>
> mat <- mat[-nrow(mat),] the result is a list.
>
> So my next call mat[10,] will t
Good day R-community,
i just wondered if it is a bug or a feature...
When i have a matrix "mat" with one column and i delete the last row with
mat <- mat[-nrow(mat),] the result is a list.
So my next call mat[10,] will throw an "wrong dimension" error.
The proper call must be:
mat <- as.matrix
4 matches
Mail list logo