Re: [R] accessing members of a list

2014-03-28 Thread Rui Barradas
Sorry, that should be temp.tables <- temp.tables[-(31:32),] Rui Barradas Em 28-03-2014 10:58, Rui Barradas escreveu: Hello, Maybe the following will help. library(XML) oneurl="http://www.tutiempo.net/en/Climate/FUKUSHIMA/11-2012/475950.htm"; temp.tables=readHTMLTable(oneurl, which = 3) st

Re: [R] accessing members of a list

2014-03-28 Thread Rui Barradas
Hello, Maybe the following will help. library(XML) oneurl="http://www.tutiempo.net/en/Climate/FUKUSHIMA/11-2012/475950.htm"; temp.tables=readHTMLTable(oneurl, which = 3) str(temp.tables) temp.tables <- temp.tables[-31,] temp.tables[,1:10] <- lapply(temp.tables[,1:10], function(x) as.numeric

Re: [R] accessing members of a list

2014-03-28 Thread Pascal Oettli
Hello, You are right, the "which" option avoid the selection in my example. Also, I think ?"[[" might be helpful for you. Regards. Pascal On Fri, Mar 28, 2014 at 3:02 PM, Bill wrote: > Hi. I found that this works: > tt=readHTMLTable(url,header=TRUE, as.data.frame=TRUE,which=c(3)) > tt[1,] > I

Re: [R] accessing members of a list

2014-03-27 Thread Pascal Oettli
Hello, Your example leads to error. Anyway: library(XML) oneurl="http://www.tutiempo.net/en/Climate/FUKUSHIMA/11-2012/475950.htm"; temp.tables=readHTMLTable(oneurl, header=TRUE) temp.tables <- temp.tables[[3]] temp.tables <- temp.tables[1:30,] HTH, Pascal On Fri, Mar 28, 2014 at 2:42 PM, Bill

[R] accessing members of a list

2014-03-27 Thread Bill
Hi. I ran some code and I am trying to access the table with the data in it. I want in particular to delete the 31st row for example Monthly means and totals: or remove the names of the columns (or change them). DayT TM Tm SLPHPP VVV VM VG RA SN TS