# NOT RUN {
# Automatically sorts observations to match UKB sample file and writes missing values as -999
my_ukb_sample <- ukb_gen_read_sample("ukb.sample")
ukb_gen_write_bgenie(
my_ukb_data,
ukb.sample = my_ukb_sample,
ukb.variables = c("height", "weight", "iq")
path = "my_ukb_bgenie.pheno",
)
ukb_gen_write_bgenie(
my_ukb_data,
ukb.sample = my_ukb_sample,
ukb.variables = c("age", "socioeconomic_status", "genetic_pcs")
path = "my_ukb_bgenie.cov",
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataCamp Workspace