I have a data frame like this one below and I really want to remove the row names when I export it to a excel file using the xlsx package.
bd <- data.frame(id
Set the rownames to NULL to remove them:
NULL
rownames(bd) <- NULL
Also, from xlsx documentation:
write.xlsx(x, file, sheetName="Sheet1", col.names=TRUE, row.names=TRUE, append=FALSE)
Set row.names to FALSE to avoid the first column being row names.
FALSE