search for: inf_i

Displaying 1 result from an estimated 1 matches for "inf_i".

Did you mean: inf_
2011 Jun 26
2
Accessing variables in a data frame
...name <- c("gdp","inf","unp") var.id <- c("w","i") x <- paste(var.name, rep(var.id, each=length(var.name)), sep="_") How can I access variables in the dama.frame by names listed in x, for example to compute gdp_w - gdp_i inf_w - inf_i unp_w - unp_i or gdp - gdp_w inf - inf_w unp - unp_w without needing to code each difference separately? Thanks for your help! Serguei Kaniovski [[alternative HTML version deleted]]