gjamDeZero {gjam} | R Documentation |
Compress (de-zero) gjam data
Description
Returns a de-zeroed (sparse matrix) version of matrix ymat
with objects needed to re-zero it.
Usage
gjamDeZero(ymat)
Arguments
ymat |
|
Details
Many abundance data sets are mostly zeros. gjamDeZero
extacts non-zero elements for storage.
Value
Returns a list containing the de-zeroed ymat
as a vector yvec
.
yvec |
non-zero elements of |
n |
no. rows of |
S |
no. cols of |
index |
index for non-zeros |
ynames |
column names of |
Author(s)
James S Clark, jimclark@duke.edu
References
Clark, J.S., D. Nemergut, B. Seyednasrollah, P. Turner, and S. Zhang. 2016. Generalized joint attribute modeling for biodiversity analysis: Median-zero, multivariate, multifarious data. Ecological Monographs 87, 34-56.
See Also
gjamReZero
to recover ymat
browseVignettes('gjam')
website 'http://sites.nicholas.duke.edu/clarklab/code/'.
Examples
## Not run:
library(repmis)
source_data("https://github.com/jimclarkatduke/gjam/blob/master/fungEnd.RData?raw=True")
ymat <- gjamReZero(fungEnd$yDeZero) # OTUs stored without zeros
length(fungEnd$yDeZero$yvec) # size of stored version
length(ymat) # full size
yDeZero <- gjamDeZero(ymat)
length(yDeZero$yvec) # recover de-zeroed vector
## End(Not run)
[Package gjam version 2.6.2 Index]