September 2017
Beginner to intermediate
560 pages
25h 18m
English
To connect to Excel using the xlsx package, follow the steps:
> write.xlsx(auto, file = "auto.xlsx", sheetName = "autobase", row.names = FALSE)
> auto$kmpg <- auto$mpg * 1.6 > auto$mpg_deviation <- (auto$mpg - mean(auto$mpg))/auto$mpg
> auto.wb <- createWorkbook() > sheet1 <- createSheet(auto.wb,"auto1") > rows <- createRow(sheet1, rowIndex=1) > cell.1 <- createCell(rows, colIndex=1)[[1,1]] > setCellValue(cell.1, "Hello Auto Data!") > addDataFrame(auto, sheet1, startRow=3, row.names=FALSE)
> cs <- CellStyle(auto.wb) + Font(auto.wb, isBold=TRUE, ...
Read now
Unlock full access