% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cdb_export_matlab.R
\name{cdb_export_matlab}
\alias{cdb_export_matlab}
\title{Export a COM(P)ADRE database to a Matlab-friendly flat text file}
\usage{
cdb_export_matlab(cdb, file, format = c("csv", "tsv"), na = "NA", quote = TRUE)
}
\arguments{
\item{cdb}{A CompadreDB object}

\item{file}{Path to the output text file}

\item{format}{Output format. Either \code{"csv"} or \code{"tsv"}}

\item{na}{String to use for missing values in the exported file}

\item{quote}{Logical indicating whether character fields should be quoted}
}
\value{
Invisibly returns the normalized path to the written file
}
\description{
Exports a \code{CompadreDB} object to a delimited text file that can be read
directly into Matlab with functions such as \code{readtable()}. Matrices and
stage vectors are converted to string representation using
\code{\link{cdb_flatten}}, so each database row remains a single tabular row
in the output file.
}
\examples{
\dontrun{
out_file <- tempfile(fileext = ".csv")
cdb_export_matlab(Compadre, out_file)
}

}
\seealso{
Other data management: 
\code{\link{cdb_flatten}()},
\code{\link{cdb_id}()},
\code{\link{cdb_id_stages}()},
\code{\link{cdb_id_studies}()},
\code{\link{cdb_mean_matF}()},
\code{\link{cdb_rbind}()},
\code{\link{cdb_unflatten}()},
\code{\link{cdb_unnest}()},
\code{\link{mpm_elementwise_apply}()},
\code{\link{mpm_mean}()},
\code{\link{mpm_median}()},
\code{\link{mpm_sd}()},
\code{\link{string_representation}}
}
\author{
Owen R. Jones <jones@biology.sdu.dk>
}
\concept{data management}
