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

mutate_obs: when adding a vector that already exists, overwrite it with msg #168

Open
zachary-foster opened this issue Apr 19, 2018 · 0 comments
Milestone

Comments

@zachary-foster
Copy link
Collaborator

> obj$mutate_obs("is_amplified",
+                unlist(subtaxa_apply(cleaned_obj,
+                                     function(x) any(x %in% names(amp_seqs)),
+                                     include_input = TRUE,
+                                     value = "original_names")))
Adding a new "logical" vector of length 404.
<Taxmap>
  415 taxa: ab. cellular organisms, ac. Eukaryota, ad. Bacteria ... py. graminicola, pz. novo
  415 edges: NA->ab, ab->ac, ab->ad, ac->ae, ac->af, ac->ag ... pm->pu, pn->pv, pp->pw, pp->px, pr->py, ps->pz
  3 data sets:
    tax_data: a named vector of 'character' with 217 items
       gw. cellular organi[truncated] ... kz. cellular organi[truncated]
    original_names: a named vector of 'character' with 217 items
       gw. Achlya_hypogyna_F ... kz. Thraustotheca_clavata_F
    is_amplified: a named vector of 'logical' with 404 items
       ab. TRUE, ac. TRUE, ad. FALSE, ae. TRUE, af. FALSE ... pv. FALSE, pw. FALSE, px. FALSE, py. FALSE, pz. FALSE
  0 functions:
> obj$mutate_obs("is_amplified",
+                unlist(subtaxa_apply(cleaned_obj,
+                                     function(x) any(x %in% names(amp_seqs)),
+                                     include_input = TRUE,
+                                     value = "original_names")))
Error in obj$mutate_obs("is_amplified", unlist(subtaxa_apply(cleaned_obj,  : 
  The dataset "is_amplified" is not a table, so columns cannot be added
@zachary-foster zachary-foster added this to the v0.3 milestone Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant