search for: cor_df

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

Did you mean: can_df
2010 Dec 02
2
Hmisc label function applied to data frame
...x3" # Get correlations cormat = cor(d) # Get vector form of lower triangular elements cors = sm2vec(cormat,diag=F) inds = sm.index(cormat,diag=F) # Create a data frame var1 = dimnames(cormat)[[1]][inds[,1]] var2 = dimnames(cormat)[[2]][inds[,2]] lbl1 = label(d[,var1]) lbl2 = label(d[,var2]) cor_df = data.frame(Var1=lbl1,Var2=lbl2,Cor=cors) The issue that I run into is when trying to get the labels in lbl1 and lbl2. I get the warning: In mapply(FUN = label, x = x, default = default, MoreArgs = list(self = TRUE), : longer argument not a multiple of length of shorter My usage of label se...