myDat <- subset(dat_yearly, myState=="OH")
RI <- subset(myDat, Facility_Type=="0_RI")
R2 <- subset(myDat, Facility_Type=="1_R2L")
RMU <- subset(myDat, Facility_Type=="2_RMU")
RMD <- subset(myDat, Facility_Type=="3_RMD")
Rural Interstate
RI_a <- RI[,c("Total", "DISTANCE", "AADT", "NO_LANES", "MEDWID",
"SURF_WID", "OptSpd", "SpdVarr1", "SpdVarr2", "SpdVarr3",
"SpdVarr4", "SpdAvg", "SpdFF")]
library("PerformanceAnalytics")
## Warning: package 'PerformanceAnalytics' was built under R version 3.5.2
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:data.table':
##
## first, last
##
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
##
## legend
chart.Correlation(RI_a, histogram=TRUE, pch=19)
Rural Two-lane
R2_a <- R2[,c("Total", "DISTANCE", "AADT",
"SURF_WID", "OptSpd", "SpdVarr1", "SpdVarr2", "SpdVarr3",
"SpdVarr4", "SpdAvg", "SpdFF")]
library("PerformanceAnalytics")
chart.Correlation(R2_a, histogram=TRUE, pch=19)
Rural Multilane Divided
RMD_a <- RMD[,c("Total", "DISTANCE", "AADT", "NO_LANES", "MEDWID",
"SURF_WID", "OptSpd", "SpdVarr1", "SpdVarr2", "SpdVarr3",
"SpdVarr4", "SpdAvg", "SpdFF")]
library("PerformanceAnalytics")
chart.Correlation(RMD_a, histogram=TRUE, pch=19)
Rural Multilane Undivided
RMU_a <- RMU[,c("Total", "DISTANCE", "AADT", "NO_LANES",
"SURF_WID", "OptSpd", "SpdVarr1", "SpdVarr2", "SpdVarr3",
"SpdVarr4", "SpdAvg", "SpdFF")]
library("PerformanceAnalytics")
chart.Correlation(RMU_a, histogram=TRUE, pch=19)