# NOT RUN {
x <- 1:10
y <- jitter(x^2)
opar <- par(no.readonly=TRUE)
par(mfcol=c(2,2))
trend.line(x,y,type='linear',plot=TRUE,pch=20,main='Linear')
trend.line(x,y,type='exponential',plot=TRUE,pch=20,main='Exponential')
trend.line(x,y,type='logarithmic',plot=TRUE,pch=20,main='Logarithmic')
trend.line(x,y,type='polynomial',plot=TRUE,pch=20,main='Polynomial')
par(opar)
# }
Run the code above in your browser using DataLab