R Studio: use xtable to create html file

601 Views Asked by At

Hoping someone can assist me in exporting my imported .csv file into an *.html file using xtable package.

Below is what I have written so far but when I check my folder the file is not there. Any insight or suggestions would be greatly appreciated.

This is what was done to import my csv data file to then export as *.html file:

Data=file.path("C:\\Users\\aacha\\OneDrive\\School\\Active Courses\\BIT-430 Intro to Business Analytics\\Week 5-Intro to a Statistical Language\\Topic 5 Data\\Data.csv")
Sales=read.csv(Data, header = TRUE, sep = ',')
View(Sales)
install.packages("xtable")
library("xtable")

Below is my attempt to create the *.html file

Sales.xtable=xtable(Sales)
xtable(Sales)
print(xtable(Sales.xtable,type = "html"), file = "C:\\Users\\aacha\\OneDrive\\School\\Active Courses\\BIT-430 Intro to Business Analytics\\Week 5-Intro to a Statistical Language\\Sales.txt"
0

There are 0 best solutions below