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
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