cscanx: Read in a matrix from a file

Description Usage Arguments Value Examples

Description

Reads in a matrix from file (no header, no row-names, no NA's, space or tab-delimiter) and returns the according R-matrix. No Need to specify dimensions.

Usage

1
cscanx(path)	

Arguments

path

character - location of the file to be read ("/path/to/file")

Value

Matrix shaped as in the file

Examples

1
2
3
4
5
6
7
8
# random matrix
X <- matrix(rnorm(10,5),10,5)

# write that matrix to a file
write.table(X,file="X",col.names=FALSE,row.names=FALSE,quote=FALSE)

# read in the matrix to object Z
Z <- cscanx("X")

cgenpp documentation built on May 2, 2019, 5:56 p.m.

Related to cscanx in cgenpp...