You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Appreciate for creating such a good package. I meet up with a problem when using ggpie with summarized data.
I have my data like this:
dt <- data.frame(
Name = c("A", "B", "C","D","E"),
number = c(40, 35, 30,25,20)
)
and this is a summarized data. According to the document mentioned in https://showteeth.github.io/ggpie/reference/ggpie.html
it seemed that I can directly use number as the proportion for the pie chart by setting count_type = "count", but it is confused that how to assign the count column and after I run my code like this:
an error occurs: Error in PrepareData(data = data, group_key = group_key, count_type = count_type, : count column is missing in your data.
How to solve the problem? Should I rename the column numbertocount? And I suggest that there should be some examples with count_type = "count" in the readme document to show how to deal with wide data instead of long data.
The text was updated successfully, but these errors were encountered:
I checked the code in utils.R and it seemed that I really need to rename the summarized data column to count. It could be better for users to assign their data column by custom.
Thanks for your advice! I noticed you used label_info = c("all"), this is not the latest usage. To increase flexibility, ggpie enables users to combine different label information ("group", "count", "ratio"):
Appreciate for creating such a good package. I meet up with a problem when using ggpie with summarized data.
I have my data like this:
and this is a summarized data. According to the document mentioned in
https://showteeth.github.io/ggpie/reference/ggpie.html
it seemed that I can directly use
number
as the proportion for the pie chart by settingcount_type = "count"
, but it is confused that how to assign thecount
column and after I run my code like this:an error occurs:
Error in PrepareData(data = data, group_key = group_key, count_type = count_type, : count column is missing in your data.
How to solve the problem? Should I rename the column
number
tocount
? And I suggest that there should be some examples withcount_type = "count"
in the readme document to show how to deal with wide data instead of long data.The text was updated successfully, but these errors were encountered: