| 1 |
\name{ftable-matrix} |
| 2 |
\alias{ftable_matrix} |
| 3 |
\alias{cbind.ftable} |
| 4 |
\alias{rbind.ftable} |
| 5 |
\alias{cbind.ftable_matrix} |
| 6 |
\alias{rbind.ftable_matrix} |
| 7 |
\alias{format.ftable_matrix} |
| 8 |
\alias{print.ftable_matrix} |
| 9 |
\alias{Write.ftable_matrix} |
| 10 |
|
| 11 |
\title{ |
| 12 |
Combining flattened tables. |
| 13 |
} |
| 14 |
\description{ |
| 15 |
With the method functions described here, flattened (contingency) tables can be combined |
| 16 |
into more complex objects, of class \code{"ftable_matrix"}. For objects of these class |
| 17 |
\code{format} and \code{print} methods are provided |
| 18 |
} |
| 19 |
\usage{ |
| 20 |
\method{cbind}{ftable}(\dots, deparse.level=1) |
| 21 |
|
| 22 |
\method{rbind}{ftable}(\dots, deparse.level=1) |
| 23 |
|
| 24 |
\method{cbind}{ftable_matrix}(\dots, deparse.level=1) |
| 25 |
|
| 26 |
\method{rbind}{ftable_matrix}(\dots, deparse.level=1) |
| 27 |
|
| 28 |
\method{format}{ftable_matrix}(x,quote=TRUE,digits=0,format="f",\dots) |
| 29 |
|
| 30 |
\method{Write}{ftable_matrix}(x, |
| 31 |
file = "", |
| 32 |
quote = TRUE, |
| 33 |
append = FALSE, |
| 34 |
digits = 0, |
| 35 |
\dots) |
| 36 |
|
| 37 |
\method{print}{ftable_matrix}(x,quote=FALSE,\dots) |
| 38 |
} |
| 39 |
\arguments{ |
| 40 |
\item{\dots}{for \code{cbind} and \code{rbind} methods, two or more objects |
| 41 |
of class \code{"ftable"} or \code{"ftable_matrix"}; for the other methods: further |
| 42 |
arguments, ignored.} |
| 43 |
\item{deparse.level}{ignored, retained for compatibility reasons only.} |
| 44 |
\item{x}{an object used to select a method.} |
| 45 |
\item{quote}{logical, indicating whether or not strings should be printed with |
| 46 |
surrounding quotes.} |
| 47 |
\item{digits}{numeric or integer, number of significant digits to be shown.} |
| 48 |
\item{format}{a format string as in \code{\link{formatC}}} |
| 49 |
\item{file}{character string, containing a file path.} |
| 50 |
\item{append}{logical, should the output appended to the file?} |
| 51 |
} |
| 52 |
\value{ |
| 53 |
\code{cbind} and \code{rbind}, when used with \code{"ftable"} or \code{"ftable_matrix"} |
| 54 |
objects, return objects of class \code{"ftable_matrix"}. |
| 55 |
} |
| 56 |
\examples{ |
| 57 |
ft1 <- ftable(Sex~Survived,Titanic) |
| 58 |
ft2 <- ftable(Age+Class~Survived,Titanic) |
| 59 |
ft3 <- ftable(Survived~Class,Titanic) |
| 60 |
ft4 <- ftable(Survived~Age,Titanic) |
| 61 |
ft5 <- ftable(Survived~Sex,Titanic) |
| 62 |
|
| 63 |
tab10 <- xtabs(Freq~Survived,Titanic) |
| 64 |
|
| 65 |
(c12.10 <- cbind(ft1,ft2,Total=tab10)) |
| 66 |
(r345.10 <- rbind(ft3,ft4,ft5,Total=tab10)) |
| 67 |
|
| 68 |
\dontrun{ |
| 69 |
tf <- tempfile() |
| 70 |
Write(c12.10,file=tf) |
| 71 |
file.show(tf) |
| 72 |
} |
| 73 |
} |