par(mfrow=c(2,1)) sp = spectrum(y123) plot(sp$freq, sp$spec, ty="l")