gt_as_genlight: Convert a 'gen_tibble' to a 'genlight' object from 'adegenet'

View source: R/gt_as_genlight.R

gt_as_genlightR Documentation

Convert a gen_tibble to a genlight object from adegenet

Description

This function converts a gen_tibble to a genlight object from adegenet

Usage

gt_as_genlight(x)

Arguments

x

a gen_tibble, with population coded as 'population'

Value

a genlight object

Examples


example_gt <- load_example_gt("gen_tbl")

# Convert to genlight
gt_genlight <- example_gt %>% gt_as_genlight()

# Check object class
class(gt_genlight)


tidypopgen documentation built on Aug. 28, 2025, 1:08 a.m.