Learn R Programming

MGDrivE (version 1.6.0)

cube2csv: Export a Cube to .csv

Description

Export a cube as multiple .csv files (one for each genotype; slices of z-axis). This function will create the directory if it doesn't exist. Files are stored as slice_(z-slice)_(genotype).csv

Usage

cube2csv(cube, directory, digits = 3)

Arguments

cube

A cube object (see MGDrivE-Cube for options)

directory

Directory to write .csv files to

digits

Number of significant digits to retain in .csv output

Examples

Run this code
# NOT RUN {
# output directory
oPath <- "path/to/write/output"

# setup inheritance cube for export, using Mendelian as the example
cube <- cubeMendelian()

# write out
cube2csv(cube = cube, directory = oPath, digits = 3)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab