Questions tagged [xtable]

A function of an R package of the same name, used to convert an R object into an object that may be printed as a LaTeX or HTML table.

This function extracts tabular information from x and returns an object of class "xtable". The nature of the table generated depends on the class of x. For example, aov objects produce ANOVA tables while data.frame objects produce a table of the entire data.frame. One can optionally provide a caption (called a title in HTML) or label (called an anchor in HTML), as well as formatting specifications. Default values for align, digits, and display are class dependent.

The available method functions for xtable are given by methods(xtable). Users can extend the list of available classes by writing methods for the generic function xtable. These methods functions should have x as their first argument with additional arguments to specify caption, label, align, digits, and display. Optionally, other arguments may be present to specify how the object x should be manipulated. All method functions should return an object whose class if given by c("xtable","data.frame"). The resulting object can have attributes caption and label, but must have attributes align, digits, and display. It is strongly recommended that you set these attributes through the provided replacement functions as they perform validity checks.

The xtable package is a creation of David Dahl with contributions and suggestions from many others.

396 questions
0
votes
2 answers

xtable for arrays

I'm trying to use xtable for 3-dimensional array. My minimal example is Test <- structure(1:8, .Dim = c(2L, 2L, 2L), .Dimnames = list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2"))) library(plyr) library(xtable) a_ply(.data=Test, .margins=3,…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
-1
votes
2 answers

Standard Deviation in parenthesis: Latex R

I want standard deviation in the parenthesis for a data frame. Since I'm using Latex, I want the output in something like: meanValue (sdValue). The data frame that I have contains columns for mean and sd values for each variable that I'm interested…
Pss
  • 553
  • 4
  • 12
-1
votes
1 answer

plot xtable or save it as image

I want to use xtable layouts in my powerpoint presentations and I need a way to directly convert a data.frame into a picture or plot of an xtable such as the ones displayed here. The ideal solution would give me a ggplot object as I have the most…
moodymudskipper
  • 46,417
  • 11
  • 121
  • 167
-2
votes
1 answer

xtable, changing column titles and adding a title

I am trying to add a title to this xtable DATA5$Predict=predict(best.mod,newx=y2, type="class") DATA5$armedornot2=ifelse(DATA5$armedornot!=1,"Yes","No") DATA5$Predict=ifelse(DATA5$Predict <0.5, "No","Yes") armedtable <-…
Vkara
  • 7
  • 2
-2
votes
2 answers

Table with function in R

I need to do some descriptive statistic on a dataset. I need to create a table from a dataset that give me, for each level in a factor the mean of another variable. city mean(age) 1 14 2 15 3 23 4 34 …
dax90
  • 1,088
  • 14
  • 29
-4
votes
1 answer

summary function in R: How to build a table

I need to approximate and build the data in the table(code below). results <- read.table(file='results',header =TRUE) out = nls(y ~(a*exp(b*x) - 1), data=results, start=list(a=0.081, b=20.89)) out <- summary(out) I found the approximation using the…
Zero149
  • 41
  • 8
1 2 3
26
27