# Table

0th

Percentile

##### One-Dimensional Table of Frequences and/or Percentages

Table is a generic function that produces a table of counts or weighted counts and/or the corresponding percentages of an atomic vector, factor or "item.vector" object. This function is intended for use with Aggregate or genTable. The "item.vector" method is the workhorse of codebook.

Keywords
univar
##### Usage
# S4 method for atomic
Table(x,weights=NULL,counts=TRUE,percentage=FALSE,…)
# S4 method for factor
Table(x,weights=NULL,counts=TRUE,percentage=FALSE,…)
# S4 method for item.vector
Table(x,weights=NULL,counts=TRUE,percentage=(style=="codebook"),
style=c("table","codebook","nolabels"),
include.missings=(style=="codebook"),
missing.marker=if(style=="codebook") "M" else "*",…)
##### Arguments
x

an atomic vector, factor or "item.vector" object

counts

logical value, should the table contain counts?

percentage

logical value, should the table contain percentages? Either the counts or the percentage arguments or both should be TRUE.

style

character string, the style of the names or rownames of the table.

weights

a numeric vector of weights of the same length as x.

include.missings

a logical value; should missing values included into the table?

missing.marker

a character string, used to mark missing values in the table (row)names.

other, currently ignored arguments.

##### Value

The atomic vector and factor methods return either a vector of counts or vector of percentages or a matrix of counts and percentages. The same applies to the "item.vector" vector method unless include.missing=TRUE and percentage=TRUE, in which case total percentages and percentages of valid values are given.

##### Aliases
• Table
• Table,atomic-method
• Table,factor-method
• Table,item.vector-method
##### Examples
# NOT RUN {