[R] readHTMLTable function - unable to find an inherited method ~ for signature "NULL"

Duncan Temple Lang duncan at wald.ucdavis.edu
Thu Jun 14 20:42:55 CEST 2012


The second page (mmo-champion.com) doesn't contain a <table>
node.

To scrape the data from the page, you will have to explore its
HTML structure.

   D.

On 6/14/12 9:31 AM, Moon Eunyoung wrote:
> Hi R experts,
> 
> I have been playing with library(XML) recently and found out that
> readHTMLTable workls flawlessly for some website, but it does give me an
> error like below
> 
>  ... Error in function (classes, fdef, mtable)  :
>   unable to find an inherited method for function "readHTMLTable", for
> signature "NULL"
> let's say..for example, this code works fine
> 
> a <-"http://www.zam.com/forum.html?forum=21&p=2"
> table_a <- readHTMLTable(a, header = TRUE, which = 1, stringsAsFactors =
> FALSE)
> 
> but, this website gives me an error  -
> 
> b <-"http://www.mmo-champion.com/forums/266-General-Discussions/page2"
> table_b <- readHTMLTable(b, header = TRUE, which = 1, stringsAsFactors =
> FALSE)
> 
> Error in function (classes, fdef, mtable)  :
>   unable to find an inherited method for function "readHTMLTable", for
> signature "NULL"
> I think this is due to the structure of the website but i'm not very
> familiar with HTML file, so I'm curious what part of HTML file makes this
> happen. (Also it will be great (!) if someone can point out how to output
> the second example (like the format that first example outputs..) without
> an error
> 
> Thanks,
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> 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.



More information about the R-help mailing list