[R] grep txt file names from html

chuck.01 CharlieTheBrown77 at gmail.com
Wed Oct 31 18:21:07 CET 2012


Sorry Sarah. 
I want to store them as a vector for use later.  

so, similar to this:

links <-
c("http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/benthic/benmet.txt",
"http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/location/watchr.txt",
"http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/wchem/chmval.txt")




Sarah Goslee wrote
> they're all of the form
> 
> http.*txt
> 
> but the best way to "grep" them (by which I assume you mean extract the
> file names from the page source) depends on what you plan to do with them,
> and what sort of output you expect.
> 
> It isn't even clear whether you plan to do this in R.
> 
> Sarah
> 
> 
> On Wed, Oct 31, 2012 at 12:56 PM, chuck.01 <

> CharlieTheBrown77@

> >wrote:
> 
>> Sorry, I know I should read a little 1st about this, but I am actually
>> just
>> helping somebody really quick and need help too.
>>
>> I want to grep all of the names of the .txt files mentioned on this html
>> web
>> page:
>>
>> http://www.epa.gov/emap/remap/html/three/data/index.html
>>
>> Thanks ahead of time.
>>
>>
> -- 
> Sarah Goslee
> http://www.functionaldiversity.org
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________

> R-help@

>  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.





--
View this message in context: http://r.789695.n4.nabble.com/grep-txt-file-names-from-html-tp4648037p4648043.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list