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>
Coverting HTML data into CSV
3 messages · El Polidan, Mark Sharp, Rui Barradas
1 day later
An example of your data will be very helpful. Saying that you have contents of an HTML file is not sufficiently descriptive. Note that the instructions recommend commented, minimal, self-contained, reproducible code. In leu of the HTML data file and code used to read it, you can use dput() with its argument being the object containing the HTML data. Mark R. Mark Sharp, Ph.D. msharp at TxBiomed.org
On Jan 19, 2017, at 4:11 PM, El Polidan <polidan19 at hotmail.com> wrote: 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.
CONFIDENTIALITY NOTICE: This e-mail and any files and/or...{{dropped:10}}
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.