A wrapper around dplyr::left_join. Adds columns to an annotation table by performing a left-join with an input data.frame (annotations on the left of the join).
Arguments
- new_columns
 (data.frame, annotation_database) A data.frame to be left-joined to the annotation table. Can also be an annotation_database.
- by
 (character) A (named) character vector of column names to join by e.g.
c("A" = "B")(seedplyr::left_joinfor details).- ...
 Additional slots and values passed to
struct_class.
Value
A  add_columns object with the following output slots:
updated | (annotation_source) The updated annotations as an annotation_source object. | 
Inheritance
A add_columns object inherits the following struct classes: add_columns() ⭢ model() ⭢ struct_class()
References
Wickham H, François R, Henry L, Müller K, Vaughan D (2023). dplyr: A Grammar of Data Manipulation. R package version 1.1.3, https://CRAN.R-project.org/package=dplyr.
Examples
M = add_columns(
      new_columns = data.frame(id=NA),
      by = "id")