Principles of econometrics with R