Roger Bivand <[EMAIL PROTECTED]> writes:
> On Sat, 21 Oct 2006, Jonathan Greenberg wrote:
>
> > That looks to me like an infinity sign (I have no idea why that is part of
> > the header of this file, but it is there). How do I modify the encoding to
> > read this in?
>
> The problem is the degree sign. Under linux:
>
> $ file tmp/Marlette_lake_snotel.csv
> tmp/Marlette_lake_snotel.csv: ISO-8859 text, with CRLF, CR line terminators
>
> so probably the conversion to multibyte is happening on your reading
> platform. Reading the file into 2.4.0 on Windows with a Norwegian 1252
> setting (Sys.getlocale()), I see the degree sign.
Nono, there is no conversion. R is _expecting_ a multibyte sequence
(utf8 most likely) and finding something that isn't part of one.
The fix should be something close to
read.csv(file("tmp/Marlette_lake_snotel.csv"), encoding="iso-8859-1")
--
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
~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907
______________________________________________
[email protected] 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.