knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Homework Assignment

This homework is due by the end of the day on September 18th 2020.

  1. If you don't already have one, create a Github handle. Add your name, netid, and Github handle to [this Google document(https://docs.google.com/document/d/18jyYEJCYTEHuavN8sBjgAt9cBTT6Yakoxnfx5hAiDR0/edit)
  2. Create an R package called bis557.
  3. Implement the linear_model() function and document it. It should take a formula, a data frame and a list of constasts for factor variables as input.
  4. Add a data.frame called lm_patho as a data set to the package. Use the lm_path.csv for the data. Create a data-raw directory in your package (hint: use usethis::use_data_raw() and usethis::use_data()) to add it to the package. Don’t forget to document it.
  5. Add the test-linear-model.r file to your regression testing (hint: use usethis::use_testthat() to create the directory structure). Make sure your implementation passes the tests.
  6. Implement gradient descent for ordinary least squares.
  7. Write test code for your gradient descent function.
  8. Add the package to Travis-CI and update the README.md file so that the badge points to your Travis build (hint: use usethis::use_travis()). You will know it is working when the badge is green and gives the message “passing”. Exra hint: sign up for the Github student pack.
  9. Add code coverage (with either Coveralls or CodeCov). Hint use usethis::use_coverage()).

Results



yijunyang/bis557 documentation built on Dec. 21, 2020, 3:06 a.m.