View source: R/basic_functions.R
GetRange | R Documentation |
simple function to extract columns from data frame
GetRange(var, range = 1:8, df)
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 |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.