powered by
Adds the class variable and an internal attributes(x)[["varname"]] attribute to a vector.
variable
attributes(x)[["varname"]]
varname(x, name)
A vector to add a varname attribute (i.e., attributes(x)[["varname"]])
varname
A name to assign to attributes(x)[["varname"]].
Returns a vector of the class variable with a attributes(x)[["varname"]] assigned.
# NOT RUN { varname(1:10, "A") attributes(varname(1:10, "A")) sum(varname(1:10, "A")) varname(LETTERS, "Caps") attributes(varname(LETTERS, "Caps")) paste(varname(LETTERS, "Caps"), collapse="") # }
Run the code above in your browser using DataLab