[R] help
peter dalgaard
pdalgd at gmail.com
Wed Mar 19 16:22:52 CET 2014
On 19 Mar 2014, at 11:10 , Mehrshad Koleini <mehrkoleini at gmail.com> wrote:
>
> I need to import some tables from a web page (https) into R and analyze
> them through the "readHTMLTable" function. After loading XML package, the
> following commands are run:
>
>> url <- "https://.../TopUp/CdrReport.aspx?lang=DK"
>> mydata <- readHTMLTable(url)
>
> and there is a warning:
> XML content does not seem to be XML: ' https://
> .../TopUp/CdrReport.aspx?lang=DK'
>
> Would you do me a favor on this issue, please?
Maybe, but you're not giving us much to go on...
If the page really isn't HTML or XML, then readHTMLTable() is not going to help you. So perhaps first see what is in there; either by opening the URL in a browser and using View Source, or by using
con <- url(url) ## you might want to reconsider the naming...
readLines(con)
close(con)
--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list