Skip to contents

[Superseded]

This function is largely superseded as the function is accessed with the $write() method for PM_data objects. There is rarely a need to call it directly. It is the companion function to PMreadMatrix. It will write an appropriate R data object to a formatted .csv file.

Usage

PMwriteMatrix(data, filename, override = F, version = "DEC_11", header = T)

Arguments

data

Must be a data.frame with appropriate structure (see PMcheck).

filename

Name of file to create.

override

Boolean operator to write even if errors are detected. Default is FALSE.

version

Which matrix data format version to write. Default is the current version.

header

Is there a header row? Default is TRUE.

Value

Returns the error report (see PMcheck for details).

Details

PMwriteMatrix will first run PMcheck to determine if there are any errors in the structure of data. If the error check fails, the file will not be written and a message will be printed on the console.

Author

Michael Neely

Examples

if (FALSE) {
# write to the current directory
library(PmetricsData)
NPex$data$write("data.csv")
}