Message-ID: <58835B20.9060600@sapo.pt>
Date: 2017-01-21T12:59:12Z
From: Rui Barradas
Subject: Coverting HTML data into CSV
In-Reply-To: <HE1PR0601MB21561F7BF42B8CD314EFE65DB67E0@HE1PR0601MB2156.eurprd06.prod.outlook.com>
Hello,
You could give us an example of what html you are trying to read.
Follow this example:
install.packages("XML")
library(XML)
url <-
"http://www.databaseolympics.com/sport/sportevent.htm?enum=110&sp=ATH"
dat <- readHTMLTable(readLines(url), which=2, header=TRUE,
stringsAsFactors = FALSE)
str(dat)
Hope this helps,
Rui Barradas
Em 19-01-2017 22:11, El Polidan escreveu:
> Good evening,
>
>
> I need to convert and HTML data file into a CSV file.
>
>
> I managed to read the html files in R. Any pointers on how to convert into a readable data frame or csv?
>
>
> Thank you.
>
>
> Sent from Outlook<http://aka.ms/weboutlook>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>