obs_cor(trait, cor_coef_threshold = 0.8, mode = c("table", "raw"))

Arguments

trait

name of the trait, e.g. "body mass index"

cor_coef_threshold

correlation coefficient threshold

mode

If mode = "table", returns a data frame (a tibble as per tidyverse convention). If mode = "raw", returns a raw response from EpiGraphDB API with minimal parsing done by httr.

Value

Data from GET /obs-cor

Examples

obs_cor(trait = "Body mass index (BMI)") %>% dplyr::glimpse()
#> Rows: 34 #> Columns: 5 #> $ trait.id <chr> "ukb-b-19953", "ukb-b-19953", "ukb-b-2303", "ukb-b-… #> $ trait.trait <chr> "Body mass index (BMI)", "Body mass index (BMI)", "… #> $ assoc_trait.id <chr> "ukb-b-2303", "ukb-b-2303", "ukb-b-19953", "ukb-b-1… #> $ assoc_trait.trait <chr> "Body mass index (BMI)", "Body mass index (BMI)", "… #> $ obs_cor.cor <dbl> 0.9912950, 0.9912950, 0.9912950, 0.9912950, 0.87366…
# Use a different threshold obs_cor(trait = "Body mass index (BMI)", cor_coef_threshold = 0.8) %>% dplyr::glimpse()
#> Rows: 34 #> Columns: 5 #> $ trait.id <chr> "ukb-b-19953", "ukb-b-19953", "ukb-b-2303", "ukb-b-… #> $ trait.trait <chr> "Body mass index (BMI)", "Body mass index (BMI)", "… #> $ assoc_trait.id <chr> "ukb-b-2303", "ukb-b-2303", "ukb-b-19953", "ukb-b-1… #> $ assoc_trait.trait <chr> "Body mass index (BMI)", "Body mass index (BMI)", "… #> $ obs_cor.cor <dbl> 0.9912950, 0.9912950, 0.9912950, 0.9912950, 0.87366…