Last updated on 2025-12-28 03:52:20 CET.
| Package | ERROR | OK |
|---|---|---|
| countrycode | 13 | |
| marginaleffects | 1 | 12 |
| modelsummary | 13 | |
| Rdatasets | 13 | |
| softbib | 13 | |
| tinysnapshot | 13 | |
| tinytable | 13 | |
| WDI | 13 |
Current CRAN status: OK: 13
Current CRAN status: ERROR: 1, OK: 12
Version: 0.31.0
Check: examples
Result: ERROR
Running examples in 'marginaleffects-Ex.R' failed
The error most likely occurred in:
> ### Name: datagrid
> ### Title: Data grids
> ### Aliases: datagrid
>
> ### ** Examples
>
> # The output only has 2 rows, and all the variables except `hp` are at their
> # mean or mode.
> datagrid(newdata = mtcars, hp = c(100, 110))
rowid mpg cyl disp drat wt qsec vs am gear carb hp
1 1 20.09062 6 230.7219 3.596563 3.21725 17.84875 0 0 4 3 100
2 2 20.09062 6 230.7219 3.596563 3.21725 17.84875 0 0 4 3 110
>
> # We get the same result by feeding a model instead of a data.frame
> mod <- lm(mpg ~ hp, mtcars)
> datagrid(model = mod, hp = c(100, 110))
rowid mpg hp
1 1 20.09062 100
2 2 20.09062 110
>
> # Use in `marginaleffects` to compute "Typical Marginal Effects". When used
> # in `slopes()` or `predictions()` we do not need to specify the
> # `model` or `newdata` arguments.
> slopes(mod, newdata = datagrid(hp = c(100, 110)))
Error in `[.data.table`(out, , `:=`(tmp_idx, seq_len(.N)), by = tmp) :
attempt access index 10/10 in VECTOR_ELT
Calls: slopes ... <Anonymous> -> do.call -> get_comparisons -> [ -> [.data.table
Execution halted
Flavor: r-devel-windows-x86_64
Current CRAN status: OK: 13
Current CRAN status: OK: 13
Current CRAN status: OK: 13
Current CRAN status: OK: 13
Current CRAN status: OK: 13
Current CRAN status: OK: 13
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.