# NOT RUN {
# create a dummy tibble with the right columns
library(tibble)
tib <- tibble(
fam = 1:3,
id = 1:3,
pat = 0,
mat = 0,
sex = 1,
pheno = 1
)
# a dummy file
file_out <- tempfile('delete-me-example', fileext = '.fam') # will also work without extension
# write the table out in *.fam format (no header, columns in right order)
write_fam(file_out, tib)
# delete output when done
file.remove(file_out)
# }
Run the code above in your browser using DataLab