Description Usage Arguments Details Value Author(s) References See Also Examples
Returns a de-zeroed (sparse matrix) version of matrix ymat
with objects needed to re-zero it.
1 | gjamDeZero(ymat)
|
ymat |
|
Many abundance data sets are mostly zeros. gjamDeZero
extacts non-zero elements for storage.
Returns a list containing the de-zeroed ymat
as a vector yvec
.
|
non-zero elements of |
|
no. rows of |
|
no. cols of |
|
index for non-zeros |
|
column names of |
James S Clark, jimclark@duke.edu
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.
gjamReZero
to recover ymat
website 'http://sites.nicholas.duke.edu/clarklab/code/'.
1 2 3 4 5 6 7 8 9 10 11 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.