search for: hrevdis1

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

Did you mean: hrevdis2
2008 May 19
2
recoding data with loops
...eally # have hundreds, but a few will illustrate the point). # I want to generate my dataframe (mdf) # with the 6 variables X 100 values with rnorm(7). # How do I do this? I tried many variations on the following: var_list <- c("HEQUAL", "EWEALTH", "ERADEQ", "HREVDIS1", "EDISCRIM", "HREVDIS2") for(i in 1:length(var_list)) {var_list[1] <- rnorm(100)} mdf <- data.frame(cbind(varlist[1:length(var_list)]) mdf # Then, I'd like to recode the variables that begin with the letter "H". # I've tried many variations of the...