Hello!
I have a data set with almost 2,000 variables (called 'Data').
I want to select only a set of variables that have a certain string in
them (e.g., Variable) - 'Variable.1', 'Variable.2', etc. until
'Variable.20'.
2 questions:
1. How can I determine the exact column index of a variable in
1. which(Exat Name == names(Data) ## Assuming Data is your data.frame
2. grep(Variable, names(Data))
Xiaohui
Dimitri Liakhovitski wrote:
Hello!
I have a data set with almost 2,000 variables (called 'Data').
I want to select only a set of variables that have a certain string in
them