Re: [R] table() reading problem

2011-03-17 Thread Jim Lemon
Sender: r-help-boun...@r-project.org On-Behalf-Of: j...@bitwrit.com.au Subject: Re: [R] table() reading problem Message-Id: <4d81c14a.2000...@bitwrit.com.au> Recipient: killian.door...@barclayscapital.com ___ e at 1 Churchill Place, London, E

Re: [R] table() reading problem

2011-03-17 Thread Jim Lemon
On 03/16/2011 08:20 PM, fre wrote: I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem to work

Re: [R] table() reading problem

2011-03-16 Thread Allan Engelhardt
On 16/03/11 09:20, fre wrote: I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem The first

Re: [R] table() reading problem

2011-03-16 Thread Sarah Goslee
It isn't entirely clear to me what you want. table() can function with many kinds of data, not just integers, so it returns a vector with names. For your case, with integer classes, you seem to possibly want: > x <- table(k) > x <- rbind(as.numeric(names(x)), as.numeric(x)) > x [,1] [,2] [,3

[R] table() reading problem

2011-03-16 Thread fre
I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem to work either. The levels keep bothering me.