GetJColByName {scellpam}R Documentation

GetJColByName

Description

Returns (as a R numeric vector) the requested named column from the matrix contained in a jmatrix binary file

Usage

GetJColByName(fname, colname)

Arguments

fname

String with the file name that contains the binary data.

colname

The name of the column to be returned. If the matrix has no column names, or the name is not found, an empty vector is returned

Value

A numeric vector with the values of elements in the requested column

Examples

Rf <- matrix(runif(48),nrow=6)
rownames(Rf) <- c("A","B","C","D","E","F")
colnames(Rf) <- c("a","b","c","d","e","f","g","h")
tmpfile1=paste0(tempdir(),"/Rfullfloat.bin")
JWriteBin(Rf,tmpfile1,dtype="float",dmtype="full",comment="Full matrix of floats")
Rf[,"c"]
vf<-GetJColByName(tmpfile1,"c")
vf

[Package scellpam version 1.4.5 Index]