Re: [R] When creating a data frame with data.frame() transforms integers into factors

2013-05-26 Thread Bert Gunter
1. Please always cc. the list; do not reply just to me. 2. OK, I see. I ERRED. Had you cc'ed the list, someone might have pointed this out. The correct example reproduces what you saw. z- sample(1:10,30,rep=TRUE) table(z) w - data.frame(table(z)) w z Freq 1 12 2 23 3 31

Re: [R] When creating a data frame with data.frame() transforms integers into factors

2013-05-26 Thread António Brito Camacho
Hello Bert. I didn't reply to the list because i forgot. I hit reply instead of reply all Thanks for your example. I understood now that i was trying to do something that didn't made sense and that was why it failed. I should have used an histogram do do a graph of the frequency of each

[R] When creating a data frame with data.frame() transforms integers into factors

2013-05-25 Thread António Camacho
Hello I am novice to R and i was learning how to do a scatter plot with R using an example from a website. My setup is iMac with Mac OS X 10.8.3, with R 3.0.1, default install, without additional packages loaded I created a .csv file in vim with the following content userID,user,posts

Re: [R] When creating a data frame with data.frame() transforms integers into factors

2013-05-25 Thread Thomas Stewart
Antonio- What exactly do you want as output? You stated you wanted a scatter plot, but which variable do you want on the X axis and which variable do you want on the Y axis? -tgs On Sat, May 25, 2013 at 3:36 PM, António Camacho toin...@gmail.com wrote: Hello I am novice to R and i was

Re: [R] When creating a data frame with data.frame() transforms integers into factors

2013-05-25 Thread Bert Gunter
Huh? z - sample(1:10,30,rep=TRUE) tbl - table(z) tbl z 1 2 3 4 5 6 7 8 9 10 4 3 2 6 3 3 2 2 2 3 data.frame(z) z 1 5 2 2 3 4 4 1 5 6 6 4 7 10 8 4 9 3 10 8 11 10 12 4 13 3 14 9 15 2 16 2 17 6 18 1 19 4 20 7 21 9 22 10 23 7 24 5 25 5 26 6 27