Skip to content

Commit d489927

Browse files
committed
shape of params changed for R model
1 parent 7b0fd7f commit d489927

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

R/g3_fit.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ g3_fit <- function(model,
2424
out_params <- params
2525

2626
if (inherits(model, "g3_r")) {
27+
if (is.data.frame(params)) params <- params$value
2728
if ("report_detail" %in% names(params) && printatstart == 1) {
2829
params$report_detail <- 1L
29-
model_output <- model(params)
30-
tmp <- attributes(model_output)
30+
tmp <- attributes(model(params))
3131
data_env <- environment(model)
3232
} else {
3333
tmp <- NULL
@@ -75,8 +75,8 @@ g3_fit <- function(model,
7575
## Run model
7676
if (is.data.frame(params)) params <- params$value
7777
params$report_detail <- 1L
78-
model_output <- model(params)
79-
tmp <- attributes(model_output)
78+
tmp <- attributes(model(params))
79+
data_env <- environment(model)
8080
}
8181

8282

0 commit comments

Comments
 (0)