Skip to contents

A $ method for gen_tibble objects

Usage

# S3 method for class 'gen_tbl'
data$i <- value

Arguments

data

a gen_tibble

i

column name

value

a value to assign

Value

a gen_tibble

Examples

example_gt <- load_example_gt("gen_tbl")

# Add a new column
example_gt$region <- "East"

example_gt
#> # 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