loc.col: loc.col

Description Usage Arguments Value Examples

View source: R/loc.col.R

Description

loc.col takes as input a data.frame object (dfData) and a character vector (colNameVec) of column names and returns a data.frame object displaying the location of the column names from colNameVec in dfData. Column names in colNameVec which cannot be found in dfData are not included in the output data.frame object.

Usage

1
loc.col(dfData, colNameVec)

Arguments

dfData

a data.frame object in which the search should be performed. Note that this is not a character string but the data.frame object itself. The parameter passed to the function should be without quotes (" ").

colNameVec

a string or a vector of class character indicating the name(s) of the column(s) to be searched.

Value

loc.col returns a data.frame object containing the column name and the column location for columns from colNameVec in dfData.

Examples

1
2
loc.col(warpbreaks,c("tension","wool"))
loc.col(iris,c("Species","Sepal.Length"))

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