Minor detail Rafael,
you're probably as well staying away from the name df as stats::df is the
density of the F distribution...

and yes, we've all done it :-)

Kindest regards,
Seán

On Tue, 30 Dec 2025 at 01:34, Dirk Eddelbuettel <[email protected]> wrote:

>
> On 29 December 2025 at 21:34, Rafael H. M. Pereira wrote:
> | # code causing the error
> |
> | library(aopdata)
> | library(ggplot2)
> | df <- aopdata::read_population
> | <https://ipeagit.github.io/aopdata/reference/read_population.html>(
> | city = 'Fortaleza',  year = 2010,  geometry = TRUE,  showProgress =
> | FALSE  )
>
> ## Are we not just talking about adding a test for null here?
>
> if (!is.null(df)) {
>
> | ggplot() +
> |   geom_sf(data=subset(df, P001>0), aes(fill=P001), color=NA, alpha=.8) +
> |   scale_fill_distiller(palette = "YlOrRd", direction = 1)+
> |   labs(title='Population distribution', fill="Total population") +
> |   theme_void()
>
> } # -- if (!is.null())
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | [email protected]
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to