Skip to contents

A mutate method for gen_tibble objects

Usage

# S3 method for class 'gen_tbl'
mutate(..., deparse.level = 1)

Arguments

...

a gen_tibble and a data.frame or tibble

deparse.level

an integer controlling the construction of column names.

Value

a gen_tibble

Examples

example_gt <- example_gt("gen_tbl")

# Add a new column
example_gt %>% mutate(region = "East")
#> # A gen_tibble: 6 loci
#> # A tibble:     7 × 4
#>   id    population  genotypes region
#>   <chr> <chr>      <vctr_SNP> <chr> 
#> 1 a     pop1                1 East  
#> 2 b     pop1                2 East  
#> 3 c     pop2                3 East  
#> 4 d     pop2                4 East  
#> 5 e     pop1                5 East  
#> 6 f     pop3                6 East  
#> 7 g     pop3                7 East