tests/testthat/test_multi_model_2.R

test_that(desc = "Test equal lengths",
                    code = {
                      skip_on_oldrel()
            expect_snapshot(
              {
                
              
            
            expect_error(multi_model_2(yields[1:50,],
                                       yields[50:95,],
                                        "height","weight",
                                       "lm"),)   
            expect_error(multi_model_2(yields[1:50,],yields[50:99,],
                                            "invalid_yname","height",
                                            "lm"))
              }
            )
            model_fit <- multi_model_2(yields[1:50,],
                                       yields[50:99,],
                                       "height","weight","glm")
            
            expect_true("predicted" %in% names(model_fit))
                    })

Try the manymodelr package in your browser

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

manymodelr documentation built on April 4, 2025, 12:01 a.m.