pir2.jv wrote:> I wrote a "program" truc.r with emacs
> In emacs, I start the buffer R, then I eval the buffer truc.r (C-c C-b)
> All is correct and I have my results.
>
> But, when I return to Console R, and make:
> > source ("truc.r"), I obtain an error:
> Erreur dans source("truc.r") :
> invalid multibyte character in parser at line 1
>
> If I copy, line by line the instructions of the emacs buffer and put
> them in R console, all is correct.
> ????
>
Sounds like encoding/locale confusion. Presumably, you have an accented
character in the file somewhere, but in a different encoding to what
source() expects. What is your platform?
Notice also that emacs sometimes switches encodings on the fly.
(Remember to follow up to the R-help, not to me. On some platforms,
there are things I Just Don't Know, and it is good practice anyway to
keep things on the list.)
> Thanks
>
>
>
>
> Jacques Vernin
>
> ______________________________________________
> 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.
--
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907