The high school statistics teacher is here, so sorry for the simple question (or maybe not so simple).
I run R to create a plot. I am trying to turn stem and leaf output from stack () into LaTeX. Here is what I got so far:
y<- c(50, 26, 31, 57, 19, 24, 22, 23, 38, 13, 50, 13, 34, 23, 30, 49, 13, 15, 51) stem(y)
I tried using xtables (because it works for my simple two-way tables):
print(xtable(stem(y)), type="latex", latex.environments=c("center"), tabular.environment = "tabular", NA.string = "")
and I get this error:
Error in UseMethod("xtable") : no applicable method for 'xtable' applied to an object of class "NULL"
I tried option variations, but I get similar results. From what I can understand, the output from stem () is not a data frame or matrix, so he doesn't like xtables. I tried changing it to a data frame / matrix using as.data.frame () and as.matrix (), but without success. Any help would be greatly appreciated. I ran some google searches without any useful results and looked at the stackoverflow site. Any help would be appreciated.
r latex
Dylan rich
source share