Displaying 2 results from an estimated 2 matches for "snow_course".
2009 Jan 12
2
problems with download.file() from ftp?
Dear list,
I am trying to download a text file from an ftp site using download.file().
I used the following code:
url <- "ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho/13e19.txt"
dest <- "c:/test/downloadtest.txt"
download.file(url, dest)
I get this error message, indicating that R is unable to open the connection:
trying URL 'ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho/13e19.txt'
Error in do...
2009 Jan 19
3
download/retain text file structure with RCurl/getURL()
...I'm trying to download a text file directly from the internet using the RCurl package and the command getURL. Duncan Lang graciously helped me solve the first step in this problem using the following command:
#################
txtfile <- getURL('ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho/13e19.txt',
ftp.use.epsv = FALSE)
#################
This brings the text file into R in a single long character string. I've spent many hours now trying to bring this text file into R into a sensible form. I've tried every variant of different commands in getURL h...