xtable-methods: Methods for Function xtable in Package 'annotationTable'

Description Usage Arguments Methods Examples

Description

xtable methods for several a4 objects, such as annotationTable objects, topTable objects etc.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## S4 method for signature 
## 'annotationTable,missing,missing,missing,missing,missing'
xtable(x, caption, label, align, digits, display)

## S4 method for signature 'annotationTable,ANY,ANY,ANY,ANY,ANY'
xtable(x, caption, label, align, digits, display)

## S4 method for signature 'annotationTable,ANY,ANY,ANY,numeric,ANY'
xtable(x, caption, label, align, digits, display)

## S3 method for class 'topTableGlmnet'
xtable(
  x,
  caption = NULL,
  label = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  ...
)

## S3 method for class 'topTableLognet'
xtable(
  x,
  caption = NULL,
  label = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  ...
)

## S3 method for class 'topTableElnet'
xtable(
  x,
  caption = NULL,
  label = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  ...
)

## S3 method for class 'pamClassConfusionTable'
xtable(
  x,
  caption = NULL,
  label = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  ...
)

## S3 method for class 'topTablePam'
xtable(x, ...)

## S3 method for class 'topTableRfClass'
xtable(
  x,
  caption = NULL,
  label = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  ...
)

Arguments

x

annotationTable object

caption

Character vector of length 1 or 2 containing the table's caption or title. If length is 2, the second item is the "short caption" used when LaTeX generates a "List of Tables". Set to NULL to suppress the caption. Default value is NULL.

label

Character vector of length 1 containing the LaTeX label or HTML anchor. Set to NULL to suppress the label. Default value is NULL.

align

Character vector of length equal to the number of columns of the resulting table, indicating the alignment of the corresponding columns. Also, "|" may be used to produce vertical lines between columns in LaTeX tables, but these are effectively ignored when considering the required length of the supplied vector. If a character vector of length one is supplied, it is split as strsplit(align, "")[[1]] before processing. Since the row names are printed in the first column, the length of align is one greater than ncol(x) if x is a data.frame. Use "l", "r", and "c" to denote left, right, and center alignment, respectively. Use "p{3cm}" etc. for a LaTeX column of the specified width. For HTML output the "p" alignment is interpreted as "l", ignoring the width request. Default depends on the class of x.

digits

Numeric vector of length equal to one (in which case it will be replicated as necessary) or to the number of columns of the resulting table or matrix of the same size as the resulting table, indicating the number of digits to display in the corresponding columns. Since the row names are printed in the first column, the length of the vector digits or the number of columns of the matrix digits is one greater than ncol(x) if x is a data.frame. Default depends on the class of x. If values of digits are negative, the corresponding values of x are displayed in scientific format with abs(digits) digits.

display

Character vector of length equal to the number of columns of the resulting table, indicating the format for the corresponding columns. Since the row names are printed in the first column, the length of display is one greater than ncol(x) if x is a data.frame. These values are passed to the formatC function. Use "d" (for integers), "f", "e", "E", "g", "G", "fg" (for reals), or "s" (for strings). "f" gives numbers in the usual xxx.xxx format; "e" and "E" give n.ddde+nn or n.dddE+nn (scientific format); "g" and "G" put x[i] into scientific format only if it saves space to do so. "fg" uses fixed format as "f", but digits as number of significant digits. Note that this can lead to quite long result strings. Default depends on the class of x.

...

Additional arguments. (Currently ignored.)

Methods

x = "annotationTable", caption = "missing", label = "missing", align = "missing", digits = "missing", display = "missing"

generates a LaTeX representation for the given annotationTable

x = "annotationTable", caption = "ANY", label = "ANY", align = "ANY", digits = "ANY", display = "ANY"

generates a LaTeX representation for the given annotationTable

x = "annotationTable", caption = "ANY", label = "ANY", align = "ANY", digits = "numeric", display = "ANY"

generates a LaTeX representation for the given annotationTable

Examples

1
2
3
4
5
 ## some dummy data
  dData <- data.frame(someSymbol = LETTERS[1:5], accessionNumber = c("X83928", "V00540", "U21090", "L38487", "M34057"))
 at <- annotationTable(displayData = dData,  displayCols = list(accessionNumber = "EntrezId"))
 xat <- xtable(at)
 print(xat, include.rownames = FALSE)

Example output

Loading required package: annaffy
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: GO.db
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid


Loading required package: KEGG.db

KEGG.db contains mappings based on older data because the original
  resource was removed from the the public domain before the most
  recent update was produced. This package should now be considered
  deprecated and future versions of Bioconductor may not have it
  available.  Users who want more current data are encouraged to look
  at the KEGGREST or reactome.db packages

% latex table generated in R 3.4.4 by xtable 1.8-4 package
% Tue Nov 10 09:17:49 2020
\begin{table}[ht]
\centering
\begin{tabular}{ll}
  \hline
someSymbol & accessionNumber \\ 
  \hline
A & \href{http://www.ncbi.nlm.nih.gov/gene/X83928}{X83928} \\ 
  B & \href{http://www.ncbi.nlm.nih.gov/gene/V00540}{V00540} \\ 
  C & \href{http://www.ncbi.nlm.nih.gov/gene/U21090}{U21090} \\ 
  D & \href{http://www.ncbi.nlm.nih.gov/gene/L38487}{L38487} \\ 
  E & \href{http://www.ncbi.nlm.nih.gov/gene/M34057}{M34057} \\ 
   \hline
\end{tabular}
\end{table}

a4Reporting documentation built on Nov. 8, 2020, 7:13 p.m.