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
Error in `as_string()`:
! Can't convert `NULL` to a string.
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/rlang_error>
Error in `as_string()`:
! Can't convert `NULL` to a string.
---
Backtrace:
▆
1. └─ggplot2:::`+.gg`(...)
2. └─ggplot2:::add_ggplot(e1, e2, e2name)
3. ├─ggplot2::ggplot_add(object, p, objectname)
4. └─ggtree:::ggplot_add.taxalink(object, p, objectname)
5. ├─base::as.vector(object$data[[as_name(object$mapping$taxa1)]])
6. └─rlang::as_name(object$mapping$taxa1)
7. └─rlang::as_string(x)
Run rlang::last_trace(drop = FALSE) to see 2 hidden frames.
The taxa1 and taxa2 should be the tip.label or node number of tree.
> tree
'treedata' S4 object'.
...@ phylo:
Phylogenetic tree with 8 tips and 4 internal nodes.
Tip labels:
ADH2, ADH1, ADHY, ADHX, ADH4, ADH3, ...
Rooted; includes branch lengths.
with the following features available:
'V1', 'B', 'D', 'S'.
# The associated data tibble abstraction: 12 × 7
# The 'node', 'label' and 'isTip' are from the phylo tree.
node label isTip V1 B D S
<int> <chr> <lgl> <dbl> <dbl> <chr> <chr>
1 1 ADH2 TRUE NA NA NA human
2 2 ADH1 TRUE NA NA NA human
3 3 ADHY TRUE NA NA NA nematode
4 4 ADHX TRUE NA NA NA insect
5 5 ADH4 TRUE NA NA NA yeast
6 6 ADH3 TRUE NA NA NA yeast
7 7 ADH2 TRUE NA NA NA yeast
8 8 ADH1 TRUE NA NA NA yeast
9 9 NA FALSE NA NA N NA
10 10 NA FALSE NA NA N metazoa
# ℹ 2 more rows
# ℹ Use `print(n = ...)` to see more rows
Prerequisites
Describe you issue
From the ggtree book example here:
Produces this error:
I have also tried using mapping:
Error:
Newly installed R4.4 and latest ggtree.
Software Versions
The text was updated successfully, but these errors were encountered: