I'm using R 4.5.1 with the latest version of ggplot2. The function plot_locus from the echoplot package fails because it relies on ggplot2 features that are now deprecated/defunct.
The specific errors/warnings I see:
- Error: invalid non-character version specification 'x' (type: double)
aes_string() was deprecated in ggplot2 3.0.0.
- Using
size aesthetic for lines was deprecated in ggplot2 3.4.0.
It seems the package needs to update to use aes() with tidy evaluation instead of aes_string(), and use linewidth instead of size for lines.
dat <- echodata::BST1
LD_matrix <- echodata::BST1_LD_matrix
locus_dir <- file.path(tempdir(), echodata::locus_dir)
plt <- tryCatch(
-
-
-
-
-
-
-
-
-
error = function(e) { message("plot_locus error: ", e$message); NULL }
- )
- support_thresh = 2
- Calculating mean Posterior Probability (mean.PP)...
- 4 fine-mapping methods used.
- 7 Credible Set SNPs identified.
- 3 Consensus SNPs identified.
- Filling NAs in CS cols with 0.
- Filling NAs in PP cols with 0.
plot_locus error: The facets argument of facet_grid() was deprecated in ggplot2 2.2.0 and is now defunct.Please use the rows argument instead.
warning:
1: aes_string() was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with aes().
ℹ See also vignette("ggplot2-in-packages") for more information.
ℹ The deprecated feature was likely used in the echoplot package.
Please report the issue at https://github.com/RajLabMSSM/echoplot/issues.
This warning is displayed once per session.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.
2: Using size aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use linewidth instead.
ℹ The deprecated feature was likely used in the echoplot package.
Please report the issue at https://github.com/RajLabMSSM/echoplot/issues.
This warning is displayed once per session.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.
lifecycle::last_lifecycle_warnings()
[[1]]
<warning/lifecycle_warning_deprecated>
Warning:
aes_string() was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with aes().
ℹ See also vignette("ggplot2-in-packages") for more information.
ℹ The deprecated feature was likely used in the echoplot package.
Please report the issue at https://github.com/RajLabMSSM/echoplot/issues.
I think this is because package uses deprecated ggplot2 syntax (aes_string() and the size aesthetic for lines), which causes errors in recent R/ggplot2 versions. Please update to aes() + .data[[ ]] and linewidth
Could you please update the package to be compatible with recent ggplot2 versions? Thank you for your work on this package!
I'm using R 4.5.1 with the latest version of ggplot2. The function
plot_locusfrom the echoplot package fails because it relies on ggplot2 features that are now deprecated/defunct.The specific errors/warnings I see:
aes_string()was deprecated in ggplot2 3.0.0.sizeaesthetic for lines was deprecated in ggplot2 3.4.0.It seems the package needs to update to use
aes()with tidy evaluation instead ofaes_string(), and uselinewidthinstead ofsizefor lines.plot_locus error: The
facetsargument offacet_grid()was deprecated in ggplot2 2.2.0 and is now defunct.Please use therowsargument instead.warning:
1:
aes_string()was deprecated in ggplot2 3.0.0.ℹ Please use tidy evaluation idioms with
aes().ℹ See also
vignette("ggplot2-in-packages")for more information.ℹ The deprecated feature was likely used in the echoplot package.
Please report the issue at https://github.com/RajLabMSSM/echoplot/issues.
This warning is displayed once per session.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.
2: Using
sizeaesthetic for lines was deprecated in ggplot2 3.4.0.ℹ Please use
linewidthinstead.ℹ The deprecated feature was likely used in the echoplot package.
Please report the issue at https://github.com/RajLabMSSM/echoplot/issues.
This warning is displayed once per session.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.
I think this is because package uses deprecated ggplot2 syntax (aes_string() and the size aesthetic for lines), which causes errors in recent R/ggplot2 versions. Please update to aes() + .data[[ ]] and linewidth
Could you please update the package to be compatible with recent ggplot2 versions? Thank you for your work on this package!