Learn R Programming

MQMF (version 0.1.0)

countgtone: countgtone used in apply to count the number > 1 in a vector

Description

countgtone used in apply to count the number > 1 in a vector

Usage

countgtone(invect)

Arguments

invect

vector of values

Value

A single value of zero or the number of ones

Examples

Run this code
# NOT RUN {
x <- matrix(trunc(runif(20)*10),nrow=4,ncol=5)
print(x)
apply(x,1,countgtone)
# }

Run the code above in your browser using DataLab