On 26/02/2013 09:55, Milan Bouchet-Valat wrote:
Le lundi 25 février 2013 à 20:26 -0300, Pablo Menese a écrit :
I use to work whit stata dataframe, so, when I use R I type read.dta
Until today I do that without any problem, after type:

mydata<-read.dta("C:/dropbox/dataframe.dta")
attach(mydata)

Everything works great... but today, when I typed:

mydata<-read.dta("C:/dropbox/dataframe.dta")
attach(mydata)

Appeared:

Error in substr(these, 1L, 6L) : invalid multibyte string at '<f1>'

I searched in google and nothing. Can anyone help me?
To be clear: the error appears when running read.dta(), not when calling
attach(), right? And the C:/dropbox/dataframe.dta that fails today is
different from the one that worked yesterday? Are you able to read it in
Stata?

Also, please provide the output of sessionInfo().

Note that Stata say

 4. Strings use ASCII encoding.

(in the URL linked from ?read.dta). We have seen exceptions in the past, but as the format has no way to record the encoding (it is ASCII, right?), read.dta can only read files in the native encoding.


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@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.

Reply via email to