I have a list of URLs and have extracted the content as follows:
library(httr)
link="http://www.workerspower.net/disposable-workers-the-real-price-of-sweat-shop-labor"
get.link=GET(link)
get.content=content(x2,as="text")
extract.content=str_extract_all(y2,"<p>(.*?)</p>")
This gives a "list of 1" with text. The length of each list is dependent on/varies with the URL. I would like to bind the URL [link] with the content [extract.content] and transform it into a dataframe and then import that into a Corpus. My attempts fail, eg. this does not work because of the different row lengths:
all=data.frame(url.vec=c(link1,link2),text.vec=c(extract.content1,extract.content2))
Does anyone knows how to combine a character[vector] with a character[list]?