You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dear geomnet team ,geomnet support for ggolot getwork plotly is indeed a nice thing, but I got an error when I tried to run the example code, and I was looking forward to this package working normally.
library(dplyr)
library(geomnet)
data(theme_elements)
# data step
TEnet <- fortify(as.edgedf(theme_elements$edges[,c("parent", "child")]), theme_elements$vertices)
# create a degree variable for use later
TEnet <- TEnet %>%
group_by(from_id) %>%
mutate(degree = sqrt(10 * n() + 1))
# plot
ggplot(data = TEnet,
aes(from_id = from_id, to_id = to_id)) +
geom_net(layout.alg = "fruchtermanreingold",
aes(fontsize = degree), directed = TRUE,
labelon = TRUE, size = 1, labelcolour = 'black',
ecolour = "grey70", arrowsize = 0.5,
linewidth = 0.5, repel = TRUE) +
theme_net() +
xlim(c(-0.05, 1.05))
###################################################################
###################################################################
Error in `geom_net()`:
! Problem while computing stat.
ℹ Error occurred in the 1st layer.
Caused by error:
! The first two columns of `x` must be of the same type.
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/rlang_error>
Error in `geom_net()`:
! Problem while computing stat.
ℹ Error occurred in the 1st layer.
Caused by error:
! The first two columns of `x` must be of the same type.
---
Backtrace:
▆
1. ├─base (local) `<fn>`(x)
2. └─ggplot2:::print.ggplot(x)
3. ├─ggplot2::ggplot_build(x)
4. └─ggplot2:::ggplot_build.ggplot(x)
5. └─ggplot2:::by_layer(...)
6. ├─rlang::try_fetch(...)
7. │ ├─base::tryCatch(...)
8. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
9. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
10. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
11. │ └─base::withCallingHandlers(...)
12. └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
13. └─l$compute_statistic(d, layout)
14. └─ggplot2 (local) compute_statistic(..., self = self)
15. └─self$stat$compute_layer(data, self$computed_stat_params, layout)
16. └─geomnet (local) compute_layer(..., self = self)
17. └─self$compute_panel(...)
18. └─geomnet (local) compute_panel(..., self = self)
19. └─self$compute_network(...)
20. └─geomnet (local) compute_network(...)
21. ├─network::as.network(na.omit(edges[, 1:2]), matrix.type = "edgelist")
22. └─network::as.network.data.frame(na.omit(edges[, 1:2]), matrix.type = "edgelist")
23. └─network:::.validate_edge_df(...)
24. └─base::stop(...)
Run rlang::last_trace(drop = FALSE) to see 5 hidden frames.
I can't run successfully on both linux and window10 systems, the same error occurs,here is my running environment(win10)
dear geomnet team ,geomnet support for ggolot getwork plotly is indeed a nice thing, but I got an error when I tried to run the example code, and I was looking forward to this package working normally.
I can't run successfully on both linux and window10 systems, the same error occurs,here is my running environment(win10)
The text was updated successfully, but these errors were encountered: