search for: readhtmltabl

Displaying 20 results from an estimated 52 matches for "readhtmltabl".

Did you mean: readhtmltable
2012 Jun 14
1
readHTMLTable function - unable to find an inherited method ~ for signature "NULL"
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 <-"...
2009 Nov 26
1
How to suppress errors generated by readHTMLTable?
library(XML) download.file('http://polya.umdnj.edu/polya_db2/gene.php?llid=109079&unigene=&submit=Submit','index.html') tables=readHTMLTable("index.html",error=function(...){}) tables readHTMLTable gives me the following errors. Could somebody let me know how to suppress them? Opening and ending tag mismatch: center and table htmlParseEntityRef: expecting ';' htmlParseEntityRef: expecting ';' htmlParseEnti...
2012 May 26
3
Problem with readHTMLTable
Hello All, i was trying to simply run the readHTMLTable on the example published in the package. And on a page I was working on. So running: u = "http://en.wikipedia.org/wiki/List_of_countries_by_population" tables = readHTMLTable(u) returns the following error: Error in tb[["thead"]] : subscript out of bounds looking up this e...
2010 Mar 18
1
Do colClasses in readHTMLTable (XML Package) work?
Hi, I can't get the colClasses option to work in the readHTMLTable function of the XML package. Here's a code fragment: require("XML") doc <- "http://www.nber.org/cycles/cyclesmain.html" table <- getNodeSet(htmlParse(doc),"//table") [[2]] # The main table is the second one because it's embedded...
2013 Jan 15
1
readHTMLTable (XML package)
Hi, I am using XML::readHTMLTable and getting the below error. Does anyone know why? Does this function not work with https? I didn't see anything in help about that. > library(XML) > wampage<-readHTMLTable('https://hr-workforce-analytics.llnl.gov/wf_pi_pop.html',1) Error in htmlParse(doc) : File https://hr...
2013 Mar 20
1
htmlParse (from XML library) working sporadically in the same code
...website. Sometimes code fails, sometimes it works, most of the time id doesn't and i cannot see why. The file i am trying to parse is  http://www.londonstockexchange.com/exchange/prices-and-markets/international-markets/indices/home/sp-500.html?page=0 Sometimes the following code works n<-readHTMLTable(htmlParse(url)) But most of the time it would return the following error coming from htmlParse: Error: failed to load HTTP resource Error is coming from the following line in htmlParse code:     ans <- .Call("RS_XML_ParseTree", as.character(file), handlers, as.logical(ignoreBlank...
2012 Sep 17
1
memory leak using XML readHTMLTable
...experiencing. In the searches I've done, it sounds like the existence of the leak is fairly well known. What isn't as clear is exactly how to solve it. The general process I'm using is this: require(XML) myFunction <- function(URL) { html <- readLines(URL) tables <- readHTMLTable(html, stringsAsFactors = FALSE) myData <- data.frame(Value = tables[[1]][, 2], row.names = make.unique(tables[[1]][, 1]), stringsAsFactors = FALSE) rm(list = c("html", "tables")) # here, and free(tables)...
2017 Jul 10
2
Problems with time formats when importing data using readHTMLTable
...te and time. Older records, as e.g. "2017-07-09 17:02 (UTC)" appear as e.g. "1499619726149961972621 hours, 59 minutes ago". I don't know how to convert these data to the time formats used in R (POSIXct). The script is very simple and worked before: library(XML) x <- readHTMLTable('url') where the 'url' is the link to the website with the specification of the vessel. I appreciate any help. Cristina -- Cristina Silva Divis?o de Modela??o e Gest?o de Recursos Pesqueiros Av. Dr. Alfredo Magalh?es Ramalho 1495-165 Lisboa @: csilva at ipma.pt <mailto:csi...
2017 Jul 10
0
Problems with time formats when importing data using readHTMLTable
...and the best-case scenario when you let your email program send HTML is that what you saw is not what we see (worst case is your email is scrambled on our end). Have you read the documentation for the function you are using? In particular, what about the colClasses argument? If you don't let readHTMLTable guess what the format is (have it read in as character data) then you have a fighting chance to get it right yourself, e.g. as.POSIXct( "2017-07-10 14:04 (UTC)", format="%Y-%m-%d %H:%M (UTC)", tz="UTC" ) ----- [1] http://stackoverflow.com/questions/5963269/how-to-m...
2011 May 05
1
issue with "strange" characters (readHTMLTable)
...gly little credit, just the brickbats for things for which we are not responsible. (We even work hard to port XML to Windows for you, again with almost zero credit.) That URL is a page in UTF-8, as its header says. We have provided many ways to work with UTF-8 on Windows, but it seems readHTMLTable() is not making use of them. You need to run iconv() on the strings in your object (which as it has factors, are the levels). When you do so, you will discover that page contains characters not in your native charset (I presume, not having your locale). What you can do, in Rgui...
2012 Jun 07
1
How to set cookies in RCurl
...is a restricted access website that I access through a proxy server (which therefore requires me to enable cookies). I have problems in allowing Rcurl to receive and send cookies. The following lines give me: library(RCurl) library(XML) url <- "http://www.theurl.com" content <- readHTMLTable(url) content $`NULL` V1 1...
2011 May 04
1
issue with "strange" characters (locale settings)
...32, R-21.13.0 Dear list, I have a problem that (I think) relates to the interaction between Windows and R. I am trying to scrape a table with data on the Hawai'ian Islands, This is my code: library(XML) u <- "http://en.wikipedia.org/wiki/Hawaii" tables <- readHTMLTable(u) Islands <- tables[[5]] The output is (first set of columns): Island Nickname > Islands Island Nickname Locati...
2017 Jul 11
1
Problems with time formats when importing data using readHTMLTable
...anged some >> permissions. >> >> Here is the script used to get the data directly from the webpage >> into R, for a sample of 20 records (10 per page): >> >> library(XML) >> x <- list() >> for (i in 1:2) >> { >> x[i]<- >> readHTMLTable(paste('http://www.marinetraffic.com/en/ais/index/positions/all/shipid:318358/mmsi:263601000/shipname:NORUEGA/per_page:10/page:', >> i, sep='')) >> } >> >> ais <- do.call('rbind', x) >> ais <- ais[,-7] >> >> and I got the foll...
2017 Jul 11
0
Problems with time formats when importing data using readHTMLTable
...ne this before with no problems, but probably the webpage changed some permissions. > > Here is the script used to get the data directly from the webpage into R, for a sample of 20 records (10 per page): > > library(XML) > x <- list() > for (i in 1:2) > { > x[i]<- readHTMLTable(paste('http://www.marinetraffic.com/en/ais/index/positions/all/shipid:318358/mmsi:263601000/shipname:NORUEGA/per_page:10/page:', i, sep='')) > } > > ais <- do.call('rbind', x) > ais <- ais[,-7] > > and I got the following table: > >> ais...
2017 Jul 11
2
Problems with time formats when importing data using readHTMLTable
...ated and quick procedure. I have done this before with no problems, but probably the webpage changed some permissions. Here is the script used to get the data directly from the webpage into R, for a sample of 20 records (10 per page): library(XML) x <- list() for (i in 1:2) { x[i]<- readHTMLTable(paste('http://www.marinetraffic.com/en/ais/index/positions/all/shipid:318358/mmsi:263601000/shipname:NORUEGA/per_page:10/page:', i, sep='')) } ais <- do.call('rbind', x) ais <- ais[,-7] and I got the following table: > ais...
2012 Aug 09
2
read htm table error
...and I haven't been able read html table. Following is my code and error message. Error in htmlParse(doc) : error in creating parser for http://en.wikipedia.org/wiki/Brazil_national_football_team theurl <- "http://en.wikipedia.org/wiki/Brazil_national_football_team" tables <- readHTMLTable(theurl) Regards, Kiung [[alternative HTML version deleted]]
2012 Sep 19
1
scraping with session cookies
...lt;- "cookies.txt" no_cookie <- function() { curlHandle <- getCurlHandle(cookiefile=cf, cookiejar=cf) getURL(site, curl=curlHandle) rm(curlHandle) gc() } if ( file.exists(cf) == TRUE ) { file.create(cf) no_cookie() } allTables <- readHTMLTable(site) allTables [[alternative HTML version deleted]]
2013 Feb 28
0
Scraping data from website---Error in htmlParse: error in creating parser
...or the football projections ( http://accuscore.com/fantasy-sports/nfl-fantasy-sports/), it displays the QB projections. When I click on another position (e.g., RB) it displays a new URL ( http://accuscore.com/fantasy-sports/nfl-fantasy-sports/Rest-of-Season-RB). When I enter this new URL into the readHTMLTable function, I receive the following error: Error in htmlParse(" http://accuscore.com/fantasy-sports/nfl-fantasy-sports/Rest-of-Season-RB/") : error in creating parser for http://accuscore.com/fantasy-sports/nfl-fantasy-sports/Rest-of-Season-RB/ What's going on? Might this have som...
2010 Nov 04
3
postForm() in RCurl and library RHTMLForms
...to see the data on the website url <- "http://www.nseindia.com/content/indices/ind_histvalues.htm" for the index "S&P CNX NIFTY" for dates "FromDate"="01-11-2010","ToDate"="02-11-2010" then read the html table from the page using readHTMLtable() I am using this code webpage <- postForm(url,.params=list( "FromDate"="01-11-2010", "ToDate"="02-11-2010", "IndexType"="S&P CNX NIFTY",...
2011 May 26
2
What am I doing wrong with sapply ?
...oking for. 9 : s <-sapply(unlist(v[c(1:length(v))]), max) 11: for(i in 1 :length(v)) v1[i] <- max(unlist(v[i])) Shouldn't I get the same answer ? library(XML) rm(list=ls()) url <- "http://webapp.montcopa.org/sherreal/salelist.asp?saledate=05/25/2011" tbl <-data.frame(readHTMLTable(url))[2:404, c(3,5,6,8,9)] names(tbl) <- c("Address", "Township", "Parcel", "SaleDate", "Costs"); rownames(tbl) <- c(1:length(tbl[,1])) x <-tbl v <- gregexpr("( aka )|( AKA )",x$Address) s <-sapply(unlist(v[c(1:length(v))])...