Format instructions

For this problem, please turn in a separate R file that contains your source code and nothing else (i.e., it should not execute any commands other than defining functions).

The user (i.e., me) should be able to call the function by sourcing the code in your R file and then running

lasso(X, y, lambda=0.1)

(or whatever value the user supplies for lambda). This should return a list with a component called beta that contains the estimated regression coefficients. The beta component should be a length p vector, where p is the number of columns of X (i.e., don’t include the intercept).

All other design decisions (what happens internally, optional arguments, what else it returns) are up to you.