bundle_up | R Documentation |
Assign numeric values to bundles summing up to a set value
bundle_up(
x,
maxval,
group.high = c("own", "na", "error"),
group.na = c("own", "na", "same", "error")
)
x |
A numeric vector to bundle up. |
maxval |
The maximum value a bundle can have. |
group.high |
What should be done if an individual value exceeds |
group.na |
What should be done if a value is |
An integer vector of the same length as x
, where each value indicates
to which bundle the value in x
has been assigned.
Sercan Kahveci
testvec <- sample(c(NA,NA,1:14))
t(cbind(testvec,bundle_up(testvec,maxval=12,group.high="own",group.na="own")))
bundle_up(testvec,maxval=10,group.high="na",group.na="na")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.