Closed rpruim closed 6 years ago
I've pushed this to beta and master. It is easily reverted if we don't like it (just remove two lines where the renaming happens).
This propagates through df_stats()
now too:
df_stats(~substance | sex, data = mosaicData::HELPmiss, prop)
## sex prop_alcohol
## 1 male 0.412
## 2 female 0.333
df_stats(~substance | sex, data = mosaicData::HELPmiss, prop(success = "cocaine"))
## sex prop_cocaine
## 1 male 0.320
## 2 female 0.369
df_stats(~substance | sex, data = mosaicData::HELPmiss, prop, props)
## sex prop_alcohol prop_alcohol prop_cocaine prop_heroin prop_missing
## 1 male 0.412 0.412 0.320 0.267 0.00000
## 2 female 0.333 0.333 0.369 0.288 0.00901
This is a potentially breaking change (if people were relying on the names of the result for subsequent code). But it results in clearer labels and is more like how things work with
df_stats()