loc.row: loc.row

Description Usage Arguments Value Examples

View source: R/loc.row.R

Description

loc.row takes as input a column (dfCol) and a vector (vec) of elements and returns a single vector containing the row numbers where the values in vec are found in column dfCol. The row numbers in the output vector have one of the values present in vec in column dfCol.

Usage

1
loc.row(dfCol, vec)

Arguments

dfCol

a column of a data.frame object. Note that this is not a character string but the column itself (refer to examples).

vec

a vector (numeric/character) indicating the elements which are to be searched.

Value

loc.row returns the vector of row numbers from the dfCol which have values in to vec

Examples

1
2
3
loc.row(iris[,"Species"],"versicolor")
loc.row(iris[,"Sepal.Length"],c(5.7,4.8))
loc.row(warpbreaks[,"tension"],c("H"))

lwTools/agriTrf documentation built on March 26, 2020, 12:09 a.m.