cs50 / problems

Checks for check50
134 stars 227 forks source link

Fix issue in CS50R Northwest Air to account for floating point imprecision + other bugs #250

Closed wqcs50 closed 2 months ago

wqcs50 commented 2 months ago

Fixed an issue in check_5.R (air) to use all.equal() to account for floating point imprecision. Was causing check50 to fail with "air tibble does not contain highest emissions for each county" when some numerics in air$emissions are not exactly equal to the ones in check_5.RData.

Fixed an issue in check_2.R (zelda), check_3.R (zelda), check_4.R (zelda), check_5.R (zelda), check_5.R (air), check_6.R (air), check_7.R (air) to use isTRUE() with all.equal(). When not equal, all.equal() does not return FALSE but instead a vector of differences. Was causing check50 to fail with "invalid argument type".