Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GG_denhist still has errors #38

Open
Deleetdk opened this issue Jan 28, 2017 · 3 comments
Open

GG_denhist still has errors #38

Deleetdk opened this issue Jan 28, 2017 · 3 comments
Assignees
Labels

Comments

@Deleetdk
Copy link
Owner

I apparently got it not entirely right:

> GG_denhist(d, "g_noage", group = "sex")
Grouping variable contained missing values. These were removed. If you want an NA group, convert to explicit value.There were groups without any data. These were removed

Furthermore, x label is missing for non-group plot. Reprex:

> iris$Sepal.Length %>% GG_denhist()
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

But not when group is non-NULL.

@Deleetdk Deleetdk added the bug label Jan 28, 2017
@Deleetdk Deleetdk self-assigned this Jan 28, 2017
@Deleetdk
Copy link
Owner Author

Deleetdk commented Jan 28, 2017

X label not an error. It's when user passes a vector. Compare:

GG_denhist(iris, "Sepal.Length") #plot overall distribution
iris$Sepal.Length %>% GG_denhist

magrittr interferes with the deparse substitute call. Won't fix.

@Deleetdk
Copy link
Owner Author

Error was due to unused factor levels in the grouping variable. These cases were dropped as part of the earlier fix, but apparently plyr::daply cares about levels, not unique levels.

At least, that's what I think. I could not reproduce the error with a simple attempt like:

iris %>% dplyr::filter(Species == "setosa") %>% GG_denhist(var = "Sepal.Length", group = "Species")

Fixed nonetheless.

Deleetdk added a commit that referenced this issue Jan 28, 2017
@Deleetdk Deleetdk reopened this Feb 15, 2017
@Deleetdk
Copy link
Owner Author

The deparse problem is probably solvable with lazyeval.

https://cran.r-project.org/web/packages/lazyeval/vignettes/lazyeval.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant