If you are using RMarkdown, add this to the header:
---
(other configs here, like title, author, etc.)
header-includes:
- \usepackage{caption}
- \captionsetup{labelformat=empty}
---
Edit:
After talking with xtable package maintainer, David (that was very accessible), he came with this solution I post below:
I think this can be solved with xtableList. Create some data and convert the data frame to xtableList.
set.seed(230)
DF <- data.frame(a = rnorm(5), b = rnorm(5), c = rnorm(5))
library(xtable)
dfList <- list(DF)
attr(dfList, "message") <- c("A caption", "Which can have multiple lines")
Then xtable produces the following:
print(xtableList(dfList))
## % latex table generated in R 3.2.5 by xtable 1.8-3 package
## % Sat Jul 09 21:52:53 2016
## \begin{table}[ht]
## \centering
## \begin{tabular}{rrrr}
## \hline
## & a & b & c \\
## \hline
## 1 & -0.23 & 0.04 & 1.34 \\
## 2 & 0.10 & 0.57 & -1.62 \\
## 3 & 0.33 & -0.14 & 0.83 \\
## 4 & 0.36 & -0.75 & 0.20 \\
## 5 & 0.44 & 0.13 & -0.49 \\
## \hline
## \multicolumn{4}{l}{A caption}\\
##
## \multicolumn{4}{l}{Which can have multiple lines}\\
## \end{tabular}
## \end{table}
To deal with long captions you will need to split lines:
attr(dfList, "message") <- c("A caption", "Which can have", "multiple lines")