r: Extract variable column indices

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a starting string and an ending string, r will extract all columns between the first and the last string and return either a vector of strings or a vector of integers. See examples.

Usage

1
r(stringA, stringB, data.names, names = F)

Arguments

stringA

the name of the first variable you wish to extract the column for in sequence

stringB

the name of the last variable you wish to extract the column for in sequence

data.names

the names of the dataset

names

Should the names of the variables be returned? Or the column indices? Defaults to FALSE (meaning the column indices will be returned).

Value

a vector of numbers corresponding to the column names

Author(s)

Dustin Fife

See Also

make.null, get.cols

Examples

1
2
var.names = LETTERS[1:20]
r("C", "F", var.names)

vagnerfonseca/fifer documentation built on May 3, 2019, 4:06 p.m.