Learn R Programming

genMOSSplus (version 1.0)

get.data.dims: Obtains matrix dimensions

Description

Obtains the number of rows and columns in a matrix that is stored in a text file. The entries in the file should be either space or tab delimited. No missing values.

Usage

get.data.dims(genome.file)

Arguments

genome.file
Name of any file that contains a matrix of values in it, separated by either spaces or tabs.

Value

out$nrows
Number of rows in the matrix
out$ncols
Number of columns in the matrix

See Also

run1.moss

Examples

Run this code
write(rbinom(200,1,0.5), file="randbinary.txt", append=FALSE, sep=" ", ncolumns=50)
get.data.dims("randbinary.txt")
try(system("rm randbinary.txt*"))

Run the code above in your browser using DataLab