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

Warning in plot_InbreedingChr: <scale> argument of guides() cannot be FALSE #39

Open
bonifazi opened this issue Apr 27, 2023 · 2 comments · May be fixed by #28
Open

Warning in plot_InbreedingChr: <scale> argument of guides() cannot be FALSE #39

bonifazi opened this issue Apr 27, 2023 · 2 comments · May be fixed by #28

Comments

@bonifazi
Copy link

Describe the bug
Deprecated feature warning.

To Reproduce
When using detectRuns 'plot_InbreedingChr()' I get this warning:

1: The <scale> argument of guides() cannot be FALSE. Use "none" instead as of ggplot2 3.3.4.
ℹ The deprecated feature was likely used in the detectRUNS package.
Please report the issue at
https://github.com/bioinformatics-ptp/detectRUNS/issues.

Expected behavior
No warnings.

detectRUNS version

packageVersion("detectRUNS")
[1] ‘0.9.6’

platform

R.version
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.1
year 2022
month 06
day 23
svn rev 82513
language R
version.string R version 4.2.1 (2022-06-23 ucrt)
nickname Funny-Looking Kid `.

Additional context
Not sure how to point to the function code directly. Anyhow, for a fix, I guess you "just" have to change in line 69 of plot_InbreedingChr from:
g2 <- g2 + facet_grid(group ~ .) + guides(fill = FALSE)
to:
g2 <- g2 + facet_grid(group ~ .) + guides(fill = none)

@bunop
Copy link
Contributor

bunop commented Apr 28, 2023

Thank you, @bonifazi , for reporting this.

This seems to affect both plot_InbreedingChr and plot_DistributionRuns which use both guides(fill=FALSE) which is now deprecated by ggplot2. Your solution is quite correct but none is not a R object , so the proposed change is guides(fill="none"). Hope this could be integrated soon in CRAN

@bonifazi
Copy link
Author

@bunop, none has to be quoted indeed, good point. Thanks for implementing the change!

@bunop bunop linked a pull request May 9, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants