Skip to content

Commit

Permalink
return values in TableOne object explained. summary(obj$CatTable) in …
Browse files Browse the repository at this point in the history
…example
  • Loading branch information
kaz-yos committed Feb 15, 2014
1 parent 684220c commit a1e417d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
12 changes: 6 additions & 6 deletions R/CreateTableOne.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@
##' should suffice.
##' @param argsExact A named list of arguments passed to the function specified in testExact. The default is \code{list(workspace = 2*10^5)}, which specifies the memory space allocated for \code{\link{fisher.test}}.
##' @return An object of class \code{TableOne}, which really is a list of three objects.
##' \itemize{
##' \item{TableOne}{a categorical-continuous mixture data formatted and printed by the \code{\link{print.TableOne}} method}
##' \item{ContTable}{an object of class \code{ContTable}, containing continuous variables only}
##' \item{CatTable}{ an object of class \code{CattTable}, containing categorical variables only}
##' }
##' The second and third objects can be then be examined with the \code{print} and \code{summary} method, for example, \code{summary(object$CatTable)} to examine the categorical variables in detail.
##' @return \item{TableOne}{a categorical-continuous mixture data formatted and printed by the \code{\link{print.TableOne}} method}
##' @return \item{ContTable}{an object of class \code{ContTable}, containing continuous variables only}
##' @return \item{CatTable}{ an object of class \code{CatTable}, containing categorical variables only}
##' @return The second and third objects can be then be examined with the \code{print} and \code{summary} method, for example, \code{summary(object$CatTable)} to examine the categorical variables in detail.
##'
##' @author Justin Bohn, Kazuki Yoshida
##' @seealso
Expand Down Expand Up @@ -80,9 +78,11 @@
##'
##' ## See the categorical part only using $ operator
##' tableOne$CatTable
##' summary(tableOne$CatTable)
##'
##' ## See the continuous part only using $ operator
##' tableOne$ContTable
##' summary(tableOne$ContTable)
##'
##' @export
CreateTableOne <-
Expand Down
2 changes: 2 additions & 0 deletions R/tableone-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@
##'
##' ## See the categorical part only using $ operator
##' tableOne$CatTable
##' summary(tableOne$CatTable)
##'
##' ## See the continuous part only using $ operator
##' tableOne$ContTable
##' summary(tableOne$ContTable)
##'
NULL
26 changes: 17 additions & 9 deletions man/CreateTableOne.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,22 @@ CreateTableOne(vars, strata, data, test = TRUE, testApprox = chisq.test,
}
\value{
An object of class \code{TableOne}, which really is a list
of three objects. \itemize{ \item{TableOne}{a
categorical-continuous mixture data formatted and printed
by the \code{\link{print.TableOne}} method}
of three objects.

\item{TableOne}{a categorical-continuous mixture data
formatted and printed by the \code{\link{print.TableOne}}
method}

\item{ContTable}{an object of class \code{ContTable},
containing continuous variables only} \item{CatTable}{ an
object of class \code{CattTable}, containing categorical
variables only} } The second and third objects can be then
be examined with the \code{print} and \code{summary}
method, for example, \code{summary(object$CatTable)} to
examine the categorical variables in detail.
containing continuous variables only}

\item{CatTable}{ an object of class \code{CatTable},
containing categorical variables only}

The second and third objects can be then be examined with
the \code{print} and \code{summary} method, for example,
\code{summary(object$CatTable)} to examine the categorical
variables in detail.
}
\description{
Create an object summarizing categorical variables
Expand Down Expand Up @@ -126,9 +132,11 @@ summary(tableOne)

## See the categorical part only using $ operator
tableOne$CatTable
summary(tableOne$CatTable)

## See the continuous part only using $ operator
tableOne$ContTable
summary(tableOne$ContTable)
}
\author{
Justin Bohn, Kazuki Yoshida
Expand Down
2 changes: 2 additions & 0 deletions man/tableone-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ summary(tableOne)

## See the categorical part only using $ operator
tableOne$CatTable
summary(tableOne$CatTable)

## See the continuous part only using $ operator
tableOne$ContTable
summary(tableOne$ContTable)
}
\author{
Kazuki Yoshida, Justin Bohn
Expand Down

0 comments on commit a1e417d

Please sign in to comment.