I have certain variables that lm in R automatically wrap backquotes / backquotes, for example. variables with colons in names.
After some processing, I try to write the variables and coefficients of a linear model using write.table . Unfortunately, exits are also written out.
How can I prevent these backlinks from being written?
To give a simple but unrealistic example:
d <- data.frame(`1`=runif(10), y=runif(10), check.names=F) l <- lm(y ~ `1`, d) write.table(data.frame(l$coefficients), file="lm.coeffs", quote=F, sep="\t", col.names=F)
The lm.coeffs file will obviously have `1` in the first output column, not 1 . Outside of post-processing in some other script, how to remove backlinks from output?
source share