test failure
Closed this issue ยท 5 comments
๐ @dbarneche!
Via https://ropensci.r-universe.dev/ui#builds= and locally I see a test failure (maybe a new rlang version thing?)
Error (test-aimsdf-methods.R:38:5): Correct structure
Error in `plot(wa, ptype = "map")`: Can't subset `.data` outside of a data mask context.
Backtrace:
1. base::plot(wa, ptype = "map")
at test-aimsdf-methods.R:38:4
2. dataaimsr:::plot.aimsdf(wa, ptype = "map")
Happy to help if needed!
Hi @maelle !
Apologies for the late reply, I've been afk for the past couple of weeks. I'll investigate this error this week.
Thanks for the update, no problem ๐ธ
Hi @maelle you were right on the money, it is an rlang thing.
But I haven't been able to figure out the solution :(
For example, previously this piece of code would work:
ggplot(data = map_bd) +
geom_sf(colour = "grey60", fill = "burlywood2",
alpha = 0.8, lwd = 0.1) +
theme_classic() +
theme(panel.background = element_rect(fill = .data$p_bkg,
colour = .data$p_bkg,
linetype = "solid"),
legend.position = "bottom") +
labs(x = "Longitude", y = "Latitude", title = target,
subtitle = d_type) +
geom_sf(data = y_p, colour = "grey30") +
geom_label_repel(data = y_l, size = 3, hjust = 0, vjust = 0,
mapping = aes(x = .data$lon, y = .data$lat,
label = .data$par_l))
But the .data
pronoun is no longer working outside of dplyr? What would be the solution here to avoid notes on R CMD CHECK?
Ah, I think I figure it out. The issue was the .data
usage within the theme
function (that turned out to be a typo anyway). It works as intended as an aes
though. That seems to have fixed it, I'll push the updates soon.
Thank you, good detective work!