tests/testthat/test_fixef.r

#context('fixef')


### simpler test model. kiwifruit e.g. too slow?


#a <- lmer(Carbon ~ Year + (Year | Cluster), kiwifruit)

#test_that('single fixef coefs can be replaced', {

#    .a <- a
    
    # test replacement
#    fixef(a)['Year'] <- -0.13
#    expect_that(fixef(a)['Year'], equals( c(Year=-0.13) ))

    # test reversibility
#    fixef(a)['Year'] <- fixef(.a)['Year']
#    expect_that(a, is_identical_to(.a))    
#})

Try the simr package in your browser

Any scripts or data that you put into this service are public.

simr documentation built on April 14, 2023, 12:24 a.m.