[SOLVED]
Purpose is to generate from a tabular table a tabularx table. But I do not now how I can use print for this purpose, because print prints the table to PDF file before creating tabularx.
Code:
t <- read.csv("CSV-Path", header = T, na.strings = c(""), sep = ",")
xT <- xtable(t)
xTx <- strsplit(print(xT, size="\\tiny", caption.placement = "top", include.rownames=FALSE, floating=FALSE), "\n")
xTx <- unlist(xTx)
xTx[4] <- gsub("l", "X", xTx[4])
xTx[4] <- gsub("tabuXar", "tabularx", xTx[4])
xTx[14] <- gsub("tabular", "tabularx", xTx[14])
The problem is that the table is printed at line 3. But I need to use print for generating the real tabular table so that the tabularx can be created.
Saving Variable xTx as txt.-file and loading with LaTeX solves the problem.