cdb_export_matlab: Export a COM(P)ADRE database to a Matlab-friendly flat text...

View source: R/cdb_export_matlab.R

cdb_export_matlabR Documentation

Export a COM(P)ADRE database to a Matlab-friendly flat text file

Description

Exports a CompadreDB object to a delimited text file that can be read directly into Matlab with functions such as readtable(). Matrices and stage vectors are converted to string representation using cdb_flatten, so each database row remains a single tabular row in the output file.

Usage

cdb_export_matlab(cdb, file, format = c("csv", "tsv"), na = "NA", quote = TRUE)

Arguments

cdb

A CompadreDB object

file

Path to the output text file

format

Output format. Either "csv" or "tsv"

na

String to use for missing values in the exported file

quote

Logical indicating whether character fields should be quoted

Value

Invisibly returns the normalized path to the written file

Author(s)

Owen R. Jones <jones@biology.sdu.dk>

See Also

Other data management: cdb_flatten(), cdb_id(), cdb_id_stages(), cdb_id_studies(), cdb_mean_matF(), cdb_rbind(), cdb_unflatten(), cdb_unnest(), mpm_elementwise_apply(), mpm_mean(), mpm_median(), mpm_sd(), string_representation

Examples

## Not run: 
out_file <- tempfile(fileext = ".csv")
cdb_export_matlab(Compadre, out_file)

## End(Not run)


Rcompadre documentation built on April 23, 2026, 9:08 a.m.