# Creation of a file called "example.ped"
# with 4 SNPs for 3 individuals.
data("example_ped")
write.table(example_ped,"example.ped",
col.names = FALSE, row.names = FALSE, quote = FALSE)
# Conversion from the ped format ("example.ped")
# to the geno format ("example.geno").
# By default, the name of the output file is the same name
# as the input file with a .geno extension.
# Create file: "example.geno".
output = ped2geno("example.ped")
# Conversion from the ped format ("example.ped")
# to the geno format with the output file called "plop.geno".
# Create file: "plop.geno".
output = ped2geno("example.ped", "plop.geno")
# As force = false and the file "example.geno" already exists,
# nothing happens.
output = ped2geno("example.ped", force = FALSE)
Run the code above in your browser using DataLab