Re: [R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread Bob O'Hara
Ah, thanks. Now I understand a bit more what's happening (and also a bit more about connections: I have managed to avoid having to understand them). Right, now I can read my meta-data, I'll start on trying to read the data... Bob On 13 May 2014 16:10, peter dalgaard wrote: > Hi Bob, Long time

Re: [R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread peter dalgaard
Hi Bob, Long time no see. The following works for me. In general, I think it is tricky to rely on encodings to be passed on to the appropriate agent, so try to be as specific as possible about it. con <- url("ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt";, encoding

Re: [R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread Prof Brian Ripley
On 13/05/2014 14:35, Bob O'Hara wrote: I'm trying to read a text file (actually the ftp file in command below), and I'm getting an error: SpCodes=read.fwf(" ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt";, + widths=c(7,6,51,51), skip=6, n=5, header=F, st

[R] File coding problem: how to read a windows-1252 encoded file

2014-05-13 Thread Bob O'Hara
I'm trying to read a text file (actually the ftp file in command below), and I'm getting an error: > SpCodes=read.fwf(" ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt";, + widths=c(7,6,51,51), skip=6, n=5, header=F, stringsAsFactors=F) Error in substring(x, f