# NOT RUN {
data(dft) # Titanic dataset
df <- dft[,2:5]
corr(df)
# Ignore specific column
corr(df, ignore = "Pclass")
# Keep redundant combinations
corr(df, redundant = TRUE)
#' # Calculate p-values as well
corr(df, pvalue = TRUE)
# Test when no more than 2 non-missing values
df$trash <- c(1, rep(NA, nrow(df)-1))
# and another method...
corr(df, method = "spearman")
# }
Run the code above in your browser using DataLab