Learn R Programming

expss (version 0.11.6)

qc: Create vector of characters from unquoted strings (variable names)

Description

  • qc It is often needed to address variables in the data.frame in the such manner: dfs[ , c("var1", "var2", "var3")]. qc ("quoted c") is a shortcut for the such cases to reduce keystrokes. With qc you can write: dfs[ , qc(var1, var2, var3)].

  • qe returns list of expression.

Usage

qc(...)

qe(...)

Value

Vector of characters or expressions

Arguments

...

unquoted names of variables in qc or unquoted expressions in qe.

Examples

Run this code

## qc
qc(a, b, c)
identical(qc(a, b, c), c("a", "b", "c"))

mtcars[, qc(am, mpg, gear)]

## qe
qe(mrset(a1 %to% a6), mrset(b1 %to% b6), mrset(c1 %to% c6))

Run the code above in your browser using DataLab