Re: [R] matrix -> delete last row -> list

2015-07-04 Thread Michael Sumner
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

Re: [R] matrix -> delete last row -> list

2015-07-03 Thread Sarah Goslee
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

Re: [R] matrix -> delete last row -> list

2015-07-03 Thread Marc Schwartz
> 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

[R] matrix -> delete last row -> list

2015-07-03 Thread Zander, Joscha
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