Learn R Programming

multiClust (version 1.0.2)

WriteMatrixToFile: Function to write a data matrix to a text file.

Description

Function to write a data matrix to a text file.

Usage

WriteMatrixToFile(tmpMatrix, tmpFileName, blnRowNames, blnColNames)

Arguments

tmpMatrix
The object matrix containing data.
tmpFileName
The string name of the text file to write the matrix to.
blnRowNames
Logical value indicating if row names of the matrix should be written along with the matrix.
blnColNames
Logical value indicating if the column names of the matrix should be written with the matrix.

Value

  • Text file containing the data matrix.

See Also

write.table

Examples

Run this code
#Load sample dataset
data(iris)
# View sample matrix
iris[1:4, 1:4]
# Write sample matrix to text file
WriteMatrixToFile(tmpMatrix=iris, tmpFileName="iris.sample.matrix.txt",
blnRowNames=TRUE, blnColNames=TRUE)

Run the code above in your browser using DataLab