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

bug: when a variable only has one value nothing is drawn #6

Open
heike opened this issue Sep 3, 2019 · 5 comments
Open

bug: when a variable only has one value nothing is drawn #6

heike opened this issue Sep 3, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@heike
Copy link
Collaborator

heike commented Sep 3, 2019

data(flea, package="GGally")
flea$one <- 1
flea %>%
ggplot(aes(vars = vars(1:8))) +
geom_pcp(aes(colour=species))

@yaweige
Copy link
Owner

yaweige commented Sep 3, 2019

There is also a "removed data" case in the README for "wide" data set which might be related

@yaweige
Copy link
Owner

yaweige commented Sep 3, 2019

I believe this is caused by transform_pcp(), where (max()-min()) is used as denominator

@yaweige
Copy link
Owner

yaweige commented Sep 3, 2019

We should also coerce the character variables to factor variables in the gather_pcp(), otherwise, it won't work with charactor variables.

@yaweige
Copy link
Owner

yaweige commented Sep 3, 2019

And also take care of the classes of variables, for example, when it is an "integer", after transformation, it should be "numeric", but it is still recorded as "integer" which is carried over from gather_pcp. This could also happen in coercing character vectors. When the class is "charactor", the Statpcp will produce an error.

@yaweige
Copy link
Owner

yaweige commented Sep 3, 2019

But "integer" is fine

@yaweige yaweige added the bug Something isn't working label Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants