propbrk | R Documentation |
Calculates the proportion of values in a vector that are equal to a specified value.
propbrk(x,trueval=TRUE,na.rm=TRUE)
x |
a character, factor or numeric vector. |
trueval |
the value to be matched in ‘x’. |
na.rm |
whether to remove NA values. |
‘propbrk’ calculates the proportion of values matching a specified value. It is mainly to allow proportions to be calculated in the ‘brkdnNest’ function. It always discards NAs in ‘x’ when summing the number equal to ‘trueval’, but respects the ‘na.rm’ argument when calculating the total number of values in ‘x’.
nil
Jim Lemon
brkdnNest
propbrk(sample(LETTERS,100,TRUE),trueval="M")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.