cor_df_long | R Documentation |
Calculate correlation within a data.frame and create a long data.frame as output
cor_df_long(df, id_cols)
df |
data.frame |
id_cols |
columns which are not features (descriptors) |
all columns which are not included in 'id_cols' will be used for calculation of correlation.
returns a long data.frame with additional columns: 'id1' and 'id2' (referencing to the row number of the original data.frame) and 'id_cols' with appended '.x' and '.y' suffixes. The column 'value' will contain correlation coefficient
d <- data.frame(name = LETTERS[1:4], x = rnorm(4), y = rnorm(4), z = rnorm(4))
df <- cor_df_long(d, "name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.