# Creation of of file called "example.ancestrymap"
# a file containing 4 SNPs for 3 individuals.
data("example_ancestrymap")
write.table(example_ancestrymap,"example.ancestrymap",
col.names = FALSE, row.names = FALSE, quote = FALSE)
# Conversion from the ancestrymap format ("example.ancestrymap")
# 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 = ancestrymap2geno("example.ancestrymap")
# Conversion from the ancestrymap format (example.ancestrymap)
# to the geno format with the output file called plop.geno.
# Create file: "plop.geno".
output = ancestrymap2geno("example.ancestrymap", "plop.geno")
# As force = false and the file "example.geno" already exists,
# nothing happens.
output = ancestrymap2geno("example.ancestrymap", force = FALSE)
Run the code above in your browser using DataLab