Learn R Programming

GLDEX (version 2.0.0.9.3)

fun.which.zero: Determine which values are zero.

Description

Returns an integer vector showing the position of zero values in the data.

Usage

fun.which.zero(data)

Value

An integer vector showing the position of zero values in the data.

Arguments

data

A vector of data.

Author

Steve Su

See Also

fun.zero.omit

Examples

Run this code
# Finding where the zeros are in this vector: c(0,1,2,3,4,0,2)
fun.which.zero(c(0,1,2,3,4,0,2))
# Finding where the zeros are in this vector: c(0,1,2,3,NA,0,2)
fun.which.zero(c(0,1,2,3,NA,0,2))

Run the code above in your browser using DataLab