Thanks for all your help. I found adding the 'stringsAsFactors' condition
solved the problem.
On 1 June 2010 17:09, Joris Meys jorism...@gmail.com wrote:
Hi Jessica,
this tells me that your text is saved as a factor.
Try :
names - read.csv(file=Names.csv,stringsAsFactors=F)
Cheers
Joris
My issue relates to adding text to a matrix and finding that the text is
converted to a number.
This is the section of code I'm having trouble with:
# First, I load in a list of names from a .csv file to 'names'
names - read.csv(file(Names.csv))
# Then I define a matrix which will be
On Tue, Jun 1, 2010 at 5:04 AM, Jessica Queree
j.j.que...@googlemail.com wrote:
My issue relates to adding text to a matrix and finding that the text is
converted to a number.
A matrix can only hold one type of data. Since you started with character,
that's what you get.
A dataframe can hold
Jessica,
Two further comments:
1. When you read your data, your character vectors are
stored as factors; is that what you want?
2. You may be better off using a list.
-Peter Ehlers
On 2010-06-01 7:47, Sarah Goslee wrote:
On Tue, Jun 1, 2010 at 5:04 AM, Jessica Queree
Hi Jessica,
this tells me that your text is saved as a factor.
Try :
names - read.csv(file=Names.csv,stringsAsFactors=F)
Cheers
Joris
On Tue, Jun 1, 2010 at 11:04 AM, Jessica Queree
j.j.que...@googlemail.comwrote:
My issue relates to adding text to a matrix and finding that the text is
5 matches
Mail list logo