# tests/testthat/test-linreg.R In shiandy/myFirstProject: What the Package Does (One Line, Title Case)

```test_that("beta on average is correct", {
alpha_true <- 1
beta_true <- 0.5
beta_sim <- linreg_sim(1000, 100, alpha_true, beta_true)
expect_equal(mean(beta_sim), beta_true)
})

test_that("get_lm_components is returning correctly", {
x <- rnorm(100)
y <- 0.2 + 0.1 * x + rnorm(100)
mod <- lm(y ~ x)
beta <- get_lm_components(mod)
expect_identical(names(beta), "x")
})
```
shiandy/myFirstProject documentation built on Dec. 4, 2019, 12:39 a.m.
{"ft_lang_label":"__label__en","ft_lang_prob":0.61273384,"math_prob":0.94492155,"size":481,"snap":"2019-51-2020-05","text_gpt3_token_len":138,"char_repetition_ratio":0.10691824,"word_repetition_ratio":0.0,"special_character_ratio":0.34303534,"punctuation_ratio":0.16455697,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9821285,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-26T06:22:45Z\",\"WARC-Record-ID\":\"<urn:uuid:74c9a53c-af2f-4338-8da1-0568fc131fc4>\",\"Content-Length\":\"47901\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6fe310e4-9df6-46aa-8040-aa12df68a0d4>\",\"WARC-Concurrent-To\":\"<urn:uuid:ecde9a61-03e4-4585-be76-70f986573de3>\",\"WARC-IP-Address\":\"104.28.6.171\",\"WARC-Target-URI\":\"https://rdrr.io/github/shiandy/myFirstProject/src/tests/testthat/test-linreg.R\",\"WARC-Payload-Digest\":\"sha1:QUWJYZQZAISTWN5ABOD3N4PLFPAY25IU\",\"WARC-Block-Digest\":\"sha1:K6ECXBRVD5SNWVRRJC6FPMJJRAYORK7Q\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251687725.76_warc_CC-MAIN-20200126043644-20200126073644-00023.warc.gz\"}"}