@paddytobias You can turn off rounding by setting digits=NULL. Try
prj_project(
dat, list(
`V-Shaped` = c(p = "{srcreporting::dec_dig3(p, 2)} ({n})"),
`Not V-shaped` = c(p = "{srcreporting::dec_dig3(p, 2)} ({n})")
), .digits = NULL
)
I added rounding as a default because I found myself writing "{round(p, 2)}" literally every time I did a projection. On net I think it saves more typing having the default this way rather than having .digits=NULL by default.
One thing that would be neat though is to deprecate the .digits argument and replace with a .format argument which accepts a formatting function (i.e. a one place function that accepts a string and returns a string). By default .format = round_transformer but then you could write .format = srcreporting::dec_dig3
Originally posted by @kinto-b in #30 (comment)
@paddytobias You can turn off rounding by setting
digits=NULL. TryI added rounding as a default because I found myself writing
"{round(p, 2)}"literally every time I did a projection. On net I think it saves more typing having the default this way rather than having.digits=NULLby default.One thing that would be neat though is to deprecate the
.digitsargument and replace with a.formatargument which accepts a formatting function (i.e. a one place function that accepts a string and returns a string). By default.format = round_transformerbut then you could write.format = srcreporting::dec_dig3Originally posted by @kinto-b in #30 (comment)