search for: hequal

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

Did you mean: equal
2008 May 19
2
recoding data with loops
...to. # let's say I have six variables as listed below (I really # 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 th...