I am new to xtable and R in general. I have a pdf document that I want to include a table with specified column widths. I tried playing with some formatting by reading what I can find online. However, I am unable to remove the rownames and hline after using the align
function to set column widths.
ortho <- xtable(orthoInstructions,
include.rownames = FALSE,
hline.after = NULL)
align(ortho) <- c("p{0.1cm}","p{6cm}",
"p{16cm}")
print(ortho)
structure(list(Name = c("Aspirin only", "Clopidogrel or other -grels only",
"Dual Antiplatelet (Aspirin AND Clopidogrel or other -grels)",
"NSAIDS for pain (e.g. ibuprofen, naproxen, diclofenac)"), PlanNormal = c("Stop 7 days before surgery",
"Stop 3 to 7 days before surgery (PAC Nurse to advise)", "PAC Nurse to advise (Dual antiplatelets) - discuss with surgeon and anaesthetist",
"Stop 2 days before surgery")), row.names = c(NA, -4L), class = c("tbl_df",
"tbl", "data.frame"))
Have I missed something obvious?