facet_share doesn't work anymore

Hi,

I had previously adopted the code of the user [mara] from here

which was working fine.

However, it seems that R has started to throw an error:

Error in axes$y$left[[1]]$children$axis$grobs[[lab_idx]] :
attempt to select less than one element in get1index

I had tried on different versions, different operating systems, reinstalling packages etc.., but no luck.

Can anyone please advice what to do?

Looks like the error when just running facet_share is:

ggplot(df, aes(x = AgeBand, y = Population, fill = Gender)) +
  geom_bar(stat = "identity") +
  facet_share(~Gender, dir = "h", scales = "free", reverse_num = TRUE)

Error in unit(c(axes$y$left[[1]]$children$axis$widths[[tick_idx]], 1, :
'list' object cannot be coerced to type 'double'
In addition: Warning message:
In f(...) : NAs introduced by coercion

Not sure what that means yet.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.