GetJRowByName | R Documentation |
Returns (as a R numeric vector) the requested named row from the matrix contained in a jmatrix binary file
GetJRowByName(fname, rowname)
fname |
String with the file name that contains the binary data. |
rowname |
The name of the row to be returned. If the matrix has no row names, or the name is not found, an empty vector is returned |
A numeric vector with the values of elements in the requested row
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<-GetJRowByName(tmpfile1,"C")
vf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.