Dear R list,
I have a dataset with a column which should be read as character, like this:
name surname answer
1 xx yyy 00100
2 rrr hhh 01
When reading this dataset with read.table, I get
1 xx yyy 100
2 rrr hhh 1
The string column consists in answers to multiple choice
On Sun, 2005-07-10 at 18:13 +, Adrian Dusa wrote:
Dear R list,
I have a dataset with a column which should be read as character, like this:
name surname answer
1 xx yyy 00100
2 rrr hhh 01
When reading this dataset with read.table, I get
1 xx yyy 100
2 rrr hhh
Adrian Dusa wrote:
Dear R list,
I have a dataset with a column which should be read as character, like this:
name surname answer
1 xx yyy 00100
2 rrr hhh 01
When reading this dataset with read.table, I get
1 xx yyy 100
2 rrr hhh 1
The string column consists
Adrian,
To prevent coercion to numeric, try:
mydata - read.table(myfile, colClasses=character)
HTH.
alejandro
On 7/10/05, Adrian Dusa [EMAIL PROTECTED] wrote:
Dear R list,
I have a dataset with a column which should be read as character, like this:
name surname answer
1 xx yyy
On 7/10/05, alejandro munoz [EMAIL PROTECTED] wrote:
Adrian,
To prevent coercion to numeric, try:
mydata - read.table(myfile, colClasses=character)
HTH.
alejandro
On 7/10/05, Adrian Dusa [EMAIL PROTECTED] wrote:
Dear R list,
[...snip...]
Thank you all, I got it.
This is my