This will produce a graphic of the sample corr[x(t+lag), y(t)] from -max.lag to max.lag. Also, the (rounded) values of the CCF are returned invisibly unless plot=FALSE. Similar details apply to the cross-covariance.
References
You can find demonstrations of astsa capabilities at
FUN WITH ASTSA.
# NOT RUN {ccf2(soi, rec, plot=FALSE) # now you see itccf2(soi, rec) # now you don't# happy birthday momccf2(soi, rec, col=rainbow(36, v=.8), lwd=4)
# }