File: propbrk.Rd

package info (click to toggle)
r-cran-plotrix 3.8-4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,588 kB
  • sloc: makefile: 6
file content (29 lines) | stat: -rwxr-xr-x 904 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
\name{propbrk}
\alias{propbrk}
\title{Calculate the proportion of specified values in a vector}
\description{
 Calculates the proportion of values in a vector that are equal to a specified
 value.
}
\usage{
 propbrk(x,trueval=TRUE,na.rm=TRUE)
}
\arguments{
  \item{x}{a character, factor or numeric vector.}
  \item{trueval}{the value to be matched in \samp{x}.}
  \item{na.rm}{whether to remove NA values.}
}
\details{
 \samp{propbrk} calculates the proportion of values matching a specified value.
 It is mainly to allow proportions to be calculated in the \samp{brkdnNest}
 function. It always discards NAs in \samp{x} when summing the number equal to
 \samp{trueval}, but respects the \samp{na.rm} argument when calculating the
 total number of values in \samp{x}.
}
\value{nil}
\author{Jim Lemon}
\seealso{\link{brkdnNest}}
\examples{
 propbrk(sample(LETTERS,100,TRUE),trueval="M")
}
\keyword{misc}