I am unable to test this but I think you need to apply standard R escaping to backslashes in a string , remove the extraneous "\" and add the missing "pipe bars" (|
). Then the align<-
succeeds with only a warning:
xtb <- xtable(DF,
table.placement="!htp", include.rownames=FALSE,
tabular.environment='longtable',floating=FALSE)
align(xtb) <- "p{0.4\\textwidth}|p{0.15\\textwidth}|p{0.15\\textwidth}| p{0.15\\textwidth}"
#Warning message:
#In .alignStringToVector(value) : Nonstandard alignments in align string
print(xtb)
Or:
xtb <- xtable(DF, type="latex",
table.placement="!htp", include.rownames=FALSE,
tabular.environment='longtable',floating=FALSE, align= c("p{0.15\\textwidth}",
"p{0.4\\textwidth}", "p{0.15\\textwidth}|", "p{0.15\\textwidth}", "p{0.15\\textwidth}"
))