search for: _trends

Displaying 2 results from an estimated 2 matches for "_trends".

Did you mean: trends
2010 Oct 10
1
Create single vector after looping through multiple data frames with GREP
...o the trick in terms of selecting rows. Can any one suggest a solution? Yours truly, Simon Kiss #This is the reproducible code to set-up all the data frames require("XML") library(XML) #This gets the data from the web and lists them mylist <- paste ("http://www.queensu.ca/cora/_trends/mip_", c(1987:2001,2003:2006), ".htm", sep="") alltables <- lapply(mylist, readHTMLTable) #convert to dataframes r<-lapply(alltables, function(x) {as.data.frame(x)} ) #This is just some house-cleaning; structuring all the tables so they are uniform r[[1]][3]<-r[...
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...