[R] Read data in R

jim holtman jholtman at gmail.com
Tue Aug 24 07:26:18 CEST 2010


I sounds as if your data is encode as UTF-8.  You may need to specify
the fileEncoding parameter on the read.table function.

On Mon, Aug 23, 2010 at 9:00 PM, Allie818 <alice.ly at gmail.com> wrote:
>
> I have a txt file with column data separated by commas.
>
> Subject,Sessionblock,LotteryImg,SubjectResp,Pictime,Bidtime,Voltage,ForcedAns
> 10816,Session1,75_C2.jpg,No,7095,9548,Mid,Yes
> 10816,Session1,25_C1.jpg,No,16629,18130,Low,Yes
> 10816,Session1,5_C1.jpg,No,23217,24276,Low,Yes
> 10816,Session1,75_C1.jpg,NULL,36359,-66179,Low,Yes
> 10816,Session1,25_C2.jpg,NULL,49468,-66179,Mid,Yes
> 10816,Session1,75_C3.jpg,Yes,60602,62119,High,Yes
>
> I have tried to read the data with this command
> data<-read.table("/mrdata/embodied_val/data/Conditioning_TIM4_082310.txt",sep
> = ",",header=T)
>
> but I get this error
> Error in make.names(col.names, unique = TRUE) :
>  invalid multibyte string at '<ff><fe>C'
>
> What am I doing wrong?
>
> Thanks,
> Alice
> --
> View this message in context: http://r.789695.n4.nabble.com/Read-data-in-R-tp2336018p2336018.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list