To compute an ACF or PACF, use the forecast
package.
Install via Tools > Install Packages… menu.
library("forecast")
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base': as.Date, as.Date.numeric
Loading required package: timeDate
Loading required package: methods
This is forecast 7.3