GetRange {bfw}R Documentation

Get Range

Description

simple function to extract columns from data frame

Usage

GetRange(var, range = 1:8, df)

Arguments

var

variable of interest (e.g., V)

range

range of variables with same stem name (e.g., V1, V2, ..., V8) , Default: 1:8

df

data to extract from

Examples

data <- as.data.frame(matrix(1:80,ncol=8))
GetRange("V", c(1,4), data)
#    V1 V4
# 1   1 31
# 2   2 32
# 3   3 33
# 4   4 34
# 5   5 35
# 6   6 36
# 7   7 37
# 8   8 38
# 9   9 39
# 10 10 40

[Package bfw version 0.4.2 Index]