Preview:
# Load the data
data <- read.csv("data.csv")

# Calculate the correlation matrix
cor_matrix <- cor(data)

# Calculate the average correlation for each variable
average_correlations <- colMeans(cor_matrix)

# Calculate the overall average correlation
overall_average_correlation <- mean(cor(data))

# Print the average correlation values
print(average_correlations)
print(overall_average_correlation)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter