Displaying 2 results from an estimated 2 matches for "mip_2006".
Did you mean:
in_2006
2010 Oct 06
2
Converting scraped data
Dear Colleagues,
I used this code to scrape data from the URL conatined within. This
code should be reproducible.
require("XML")
library(XML)
theurl <- "http://www.queensu.ca/cora/_trends/mip_2006.htm"
tables <- readHTMLTable(theurl)
n.rows <- unlist(lapply(tables, function(t) dim(t)[1]))
class(tables)
test<-data.frame(tables, stringsAsFactors=FALSE)
test[16,c(2:5)]
as.numeric(test[16,c(2:5)])
quartz()
plot(c(1:4), test[15, c(2:5)])
calling the values from the row of interest...
2010 Oct 10
1
Create single vector after looping through multiple data frames with GREP
...r
>> # Transform a factor back into its factor names
>> {
>> return(levels(factors)[factors])
>> }
>>
>> Then, to get your data to where you want it, I'd do this:
>>
>> require(XML)
>> theurl <- "http://www.queensu.ca/cora/_trends/mip_2006.htm"
>> tables <- readHTMLTable(theurl)
>> n.rows <- unlist(lapply(tables, function(t) dim(t)[1]))
>> class(tables)
>> test<-data.frame(tables, stringsAsFactors=FALSE)
>>
>>
>> result <- test[11:42, 1:5] #Extract the actual data we want
&...