| detect_complex_types | R Documentation |
Identifies columns in a DuckDB table that contain complex types (ARRAY or MAP) that will be returned as R lists.
detect_complex_types(con, table_name)
con |
A DuckDB connection |
table_name |
Name of the table to analyze |
A data frame with columns that have complex types, showing column_name, column_type, and a description of R type.
library(DBI)
library(duckdb)
con <- rduckhts_connect()
bcf_path <- system.file("extdata", "vcf_file.bcf", package = "Rduckhts")
rduckhts_bcf(con, "variants", bcf_path, overwrite = TRUE)
complex_cols <- detect_complex_types(con, "variants")
print(complex_cols)
dbDisconnect(con, shutdown = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.