Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly typed out the library before using the functions. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IpWangHei
Copy link
Collaborator

  1. We expect students to submit 4 functions for assignment 1:
    i. simulate_data <- function(num_obs). This function takes the number of observations (num_obs) as input and outputs a dataframe with the columns i, k, e, latent, y.
    ii. compute_loglikelihood_a1 <- function(b,df). This function inputs beta (b) and the simulated dataframe (df) and outputs the loglikelihood.
    iii. plot_loglikelihood_a1 <- function(df). This function inputs the simulated dataframe (df) and outputs the ggplot.
    iv. optim_beta <- function(df). This function inputs the simulated dataframe (df) and outputs the optimal beta.

  2. We use testthat to test the function submitted by students and magick to compare each pixel of the plot. For data simulation, we do column-wise comparison so it gives more detailed feedback when an error arises.

@IpWangHei IpWangHei linked an issue Jan 15, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testthat for Automated Assignment Grading
2 participants