Description Usage Arguments Value Examples
Returns a string with the count and/or percentage of a particular level of a factor for easy reporting in general but specifically for sweaved/knitted documents.
1 2 3 4 5  | 
var | 
 name of a factor in a data frame.  | 
val | 
 value(s)/level(s) of interest to count  | 
data | 
 data.frame with var included, default to NULL. Function is intended to be used with data in data frames.  | 
operator | 
 The boolean operator to use.  Default is the match, i.e.,
  | 
na.rm | 
 a logical indicating whether missing values should be removed.  | 
show.n | 
 Boolean, default to TRUE, to show the raw counts.  | 
show.percent | 
 Boolean, default to TRUE, for reporting the percentage with the count.  | 
digits | 
 Number of decimal places to report a percentage with. This includes trailing zeros.  | 
latex | 
 Not currently implemented.  | 
A sting of the form n, (%).
1 2 3 4  | ## Load example data set diamonds from the ggplot2 package
data(diamonds, package = "ggplot2")
## find a report the number and percentage of "Fair", and/or "Good" cut diamonds
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.