search for: dfquc

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

Did you mean: dfqs
2011 Apr 19
1
Subsetting a data frame by dropping correlated variables
...variable that I will keep int he data frame. Alternatively, I could also drop both the variables that are correlated with each other. Worry not! I am not deleting data, I am just finding a subset of the data that I can use to impute some missing observations. I have tried the following statement dfQuc <- dfQ[ , sapply(dfQ, function(x) cor(dfQ, use = "pairwise.complete.obs", method ="pearson")<0.8)] but it gives me the following error: Error in `[.data.frame`(dfQ, , sapply(dfQ, function(x) cor(dfQ, use = "pairwise.complete.obs", : undefined columns selected...