install.packages("dplyr") install.packages("splithalfr") library(dplyr) library(splithalfr) #Insert the path to the file. The file should look like the SPEARMAN.txt cc <- read.table("C:/.../SPEARMAN.txt", fill=TRUE, header = T) #Produces the Spearman-Brown correlation cc %>% group_by(Faculty) %>% summarize(spearman_brown(OA_research, OA_outreach))