library(readxl)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
df <- read_excel("district.xls")
newdata <- df |> select(DZCAMPUS,DPETALLC)
cor(newdata)
##           DZCAMPUS  DPETALLC
## DZCAMPUS 1.0000000 0.9655324
## DPETALLC 0.9655324 1.0000000
pairs(~DZCAMPUS+DPETALLC,data = newdata)

cor.test(newdata$DZCAMPUS,newdata$DPETALLC,method="kendall")
## 
##  Kendall's rank correlation tau
## 
## data:  newdata$DZCAMPUS and newdata$DPETALLC
## z = 38.628, p-value < 2.2e-16
## alternative hypothesis: true tau is not equal to 0
## sample estimates:
##       tau 
## 0.7879205