Learn R Programming

networkreporting (version 0.1.1)

topcode.var: topcode a vector of numerical values

Description

this function topcodes one vector; it's used by the topcode function to topcode a set of columns in a data frame

Usage

topcode.var(x, max, to.na = NULL, ignore = NA)

Arguments

x
the vector of values to topcode
max
the maximum value; all values > max are recoded to max
to.na
a vector of values to recode to NA (this happens before topcoding)
ignore
a vector of values to leave unchanged

Value

the topcoded vector

Examples

Run this code
## Not run: 
#    ## TODO write example
# ## End(Not run)

Run the code above in your browser using DataLab