add r script for linear regression