I think you need to use a loop to iterate through each of the items in
getlinks

for(link in getlinks)
        {
        url<-paste0('http://spec.org/jEnterprise2010/results/',link)
        output<-readfiles(url)
        }

You're probably also going to need to add some error handling when your
search string doesn't exist.

On Wed, 2015-03-11 at 23:08 -0700, Kruti Pandya wrote:
> readfiles=function(x) { a<-readLines(x)
> 
> 
> sm <- "Java EE AppServer & Database Server HW (SUT
> hardware)"
> 
> 
> s<-grep(sm, a, fixed=TRUE)
> 
> 
> e<-grep("^\\S", a[-(1:s)])[1]
> 
> 
> grep("OS Vendor", a[(s+1):(s+e-1)], fixed=T, value=T)[1]
> 
> grep("OS Name", a[(s+1):(s+e-1)], fixed=T,
> value=T)[1]
> 
> }

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to