1) Never attach your data. I cannot emphasize this enough.
2) There is a problem with your CSV file. You have a character in a cell
that R cannot recognize, likely because that character is not ASCII text. I
would clean your CSV file and try again. If you are using a non-English
version of Excel to create the file, that could be the problem (because the
alphabet could be non-ASCII).
Yours,
Olivia
On Sat, Aug 6, 2011 at 12:53 PM, Sera Onalan <sera.onalan(a)gmail.com> wrote:
Hi,
I'm trying to load my data into R.
This is the command I'm using:
FinalData2.data <- read.csv('FinalData2.csv')
attach(FinalData2.data)
this is the error I get:
FinalData2.data <- read.csv('FinalData2.csv')
Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings =
character(0L)) :
invalid multibyte string at '<ff>'
attach(FinalData2.data)
Error in attach(FinalData2.data) : object 'FinalData2.data' not found
My working directory is set as this:
setwd("/Users/Sera/Desktop/R Work")
I don't understand why I'm getting this error.
I also tried this, but I still get errors:
FinalData2.csv <- read.csv(Users/Sera/Desktop/R Work/FinalData2.csv)
Error: unexpected symbol in "FinalData2.csv <-
read.csv(Users/Sera/Desktop/R Work"
+ attach(FinalData2.data)
Error in attach(FinalData2.data) : object 'FinalData2.data' not found
Sorry to bug you guys.
Thanks for your help.
Sera