You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using aniMotum this last week and after fitting a model I was making maps with the map function. Everything was working earlier in the week, but for the last few days, using the exact same code/script and keep getting the error:
Error in map(fit.rw, what = "predicted") :
argument ".f" is missing, with no default
I have tried to restart R and my computer multiple times. I have checked my code from everything I can find the code is correct.
Below is an example of the code - everything seems to work but the map function. I am sure I am doing something silly, but have not been able to figure out what has changed.
fit.crw <- fit_ssm(data_c,
model = "crw",
time.step = 3,
vmax=4,
control = ssm_control(se = TRUE))
plot(fit.crw, what = "fitted")
plot(fit.crw, what = "predicted")
plot(fit.crw, "p", type = 2, alpha = 0.1)
require(patchwork)
res.crw <- osar(fit.crw)
(plot(res.crw, type = "ts") | plot(res.crw, type = "qq")) /
(plot(res.crw, type = "acf") | plot_spacer())
map(fit.crw, what = "predicted")
map(fit.crw, what = "fitted")
The text was updated successfully, but these errors were encountered:
You've got a conflict between purrr and aniMotum - both pkgs have a map function. To resolve, you can either make sure you load purrr (or tidyverse) first and then aniMotum, or, more preferably, update the last 2 lines of your script with:
aniMotum::map(fit.crw, what = "predicted")
aniMotum::map(fit.crw, what = "fitted")
I have been using aniMotum this last week and after fitting a model I was making maps with the map function. Everything was working earlier in the week, but for the last few days, using the exact same code/script and keep getting the error:
Error in map(fit.rw, what = "predicted") :
argument ".f" is missing, with no default
I have tried to restart R and my computer multiple times. I have checked my code from everything I can find the code is correct.
Below is an example of the code - everything seems to work but the map function. I am sure I am doing something silly, but have not been able to figure out what has changed.
fit.crw <- fit_ssm(data_c,
model = "crw",
time.step = 3,
vmax=4,
control = ssm_control(se = TRUE))
plot(fit.crw, what = "fitted")
plot(fit.crw, what = "predicted")
plot(fit.crw, "p", type = 2, alpha = 0.1)
require(patchwork)
res.crw <- osar(fit.crw)
(plot(res.crw, type = "ts") | plot(res.crw, type = "qq")) /
(plot(res.crw, type = "acf") | plot_spacer())
map(fit.crw, what = "predicted")
map(fit.crw, what = "fitted")
The text was updated successfully, but these errors were encountered: