ich wollte mich mit folgenenden Anliegen um Hilfe bitten. Zur geologischen Auswertung eines Projektes benutze ich Dreicecksdiagramme Zu diesem Zweck bin ich auf das R package "ggtern" gestoßen. Zuerst war alles ok und das Package lief ohne Probleme! Seit Freitag läuft das Package nicht mehr. Auch die Code snippets, welche die Autoren selber bereitstellen sind funktionsuntüchtig! Meine Kontaktversuche die Auoren des Packages auf den Fehler hinzuweisen schlagen fehl. Deswegen meine Frage und bitte an die Spezialisten im Forum ob es einen Ausweg gibt. Hier die Code Snippets:
Code: Alles auswählen
install.packages('ggtern')
library(ggtern)
data("USDA", package = "ggtern")
dfLabels <- plyr::ddply(USDA, "Label", function(df) {
label <- as.character(df$Label[ 1 ])
df$Angle <- switch(label, "Loamy Sand" = -35, 0)
colMeans(df[setdiff(colnames(df), "Label")])
})
f5a <- ggtern(data = USDA, mapping = aes(x = Sand, y = Clay, z = Silt))+
geom_polygon(mapping = aes(fill = Label),
alpha = 0.75, size = 0.5, color = "black") +
geom_text(data = dfLabels, mapping = aes(label = Label, angle = Angle),
size = 2.5) + theme_rgbw() + theme_showsecondary() +
theme_showarrows() + custom_percent("Percent") +
guides(color = "none", fill = "none") +
labs(title = "USDA Textural Classification Chart",
fill = "Textural Class", color = "Textural Class")
print(f5a)
Selbst beim Durchlaufen dieses Codes, was vorher problemlos möglich war tritt folgende Fehlermeldung auf:
Fehler: geom_point requires the following missing aesthetics: x and y
Run `rlang::last_error()` to see where the error occurred.
rlang::last_error()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:
1. (function (x, ...) ...
2. ggtern:::print.ggplot(x)
4. ggtern:::ggplot_build.ggplot(x)
5. ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
6. ggtern:::f(l = layers[], d = data[])
7. l$compute_geom_1(d)
8. ggplot2:::f(..., self = self)
9. ggplot2:::check_required_aesthetics(...)
Run `rlang::last_trace()` to see the full context.
> rlang::last_trace()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:
x
1. +-(function (x, ...) ...
2. \-ggtern:::print.ggplot(x)
3. +-ggtern::ggplot_build(x)
4. \-ggtern:::ggplot_build.ggplot(x)
5. \-ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
6. \-ggtern:::f(l = layers[], d = data[])
7. \-l$compute_geom_1(d)
8. \-ggplot2:::f(..., self = self)
9. \-ggplot2:::check_required_aesthetics(...)
Hier mein Session Info:
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggtern_3.3.0 ggpmisc_0.4.0 ggpp_0.4.0 ggthemes_4.2.4 forcats_0.5.1
[6] stringr_1.4.0 dplyr_1.0.6 purrr_0.3.4 tidyr_1.1.3 tibble_3.1.2
[11] ggplot2_3.3.4 tidyverse_1.3.1 readr_1.4.0 readxl_1.3.1 rio_0.5.26
[16] SDAR_0.9-55
loaded via a namespace (and not attached):
[1] nlme_3.1-148 matrixStats_0.59.0 fs_1.5.0 lubridate_1.7.10
[5] httr_1.4.2 latex2exp_0.5.0 tensorA_0.36.2 tools_4.0.2
[9] backports_1.2.1 utf8_1.2.1 R6_2.5.0 DBI_1.1.1
[13] mgcv_1.8-31 colorspace_2.0-1 withr_2.4.2 tidyselect_1.1.1
[17] gridExtra_2.3 grImport2_0.2-0 bayesm_3.1-4 curl_4.3.1
[21] compiler_4.0.2 compositions_2.0-1 cli_2.5.0 rvest_1.0.0
[25] quantreg_5.86 SparseM_1.81 xml2_1.3.2 labeling_0.4.2
[29] scales_1.1.1 DEoptimR_1.0-9 robustbase_0.93-8 digest_0.6.27
[33] foreign_0.8-80 base64enc_0.1-3 jpeg_0.1-8.1 pkgconfig_2.0.3
[37] dbplyr_2.1.1 rlang_0.4.11 rstudioapi_0.13 farver_2.1.0
[41] generics_0.1.0 jsonlite_1.7.2 zip_2.2.0 magrittr_2.0.1
[45] polynom_1.4-0 Matrix_1.2-18 Rcpp_1.0.6 munsell_0.5.0
[49] fansi_0.5.0 proto_1.0.0 lifecycle_1.0.0 stringi_1.6.2
[53] yaml_2.2.1 MASS_7.3-54 plyr_1.8.6 grid_4.0.2
[57] crayon_1.4.1 lattice_0.20-41 haven_2.4.1 splines_4.0.2
[61] hms_1.1.0 pillar_1.6.1 reshape2_1.4.4 reprex_2.0.0
[65] XML_3.99-0.6 glue_1.4.2 linbin_0.1.3 data.table_1.14.0
[69] modelr_0.1.8 png_0.1-7 vctrs_0.3.8 MatrixModels_0.5-0
[73] cellranger_1.1.0 gtable_0.3.0 assertthat_0.2.1 openxlsx_4.2.4
[77] broom_0.7.7 conquer_1.0.2 ellipsis_0.3.2
Auch der Versuch das Package auf einem 2. PC zum Laufen zu bringen schlägt erstaunlicherweise fehl!
Eine Websuche brachte keine wesentlichen Erfolge!
Da ich das Package dringend für den Projektfortschritt benötige, wäre meine Frage und Bitte ob es einen Workaround für solch einen Fehler gibt?
Vielen Dank für Eure Mühe & Geduld,
retep