xcount(ssc, segment = 0, segment.name = NULL)
## S3 method for class 'xcount':
print(x, cutoff = 25, \dots)
## S3 method for class 'xcount':
plot(x, type = "hist", rug = FALSE, logscale = FALSE, \dots)
segment
within the 'sscount' object
to make the crosstabulation, the default 0
refers to "all"
segments.
It can have more than one element (but less than or equal to the number of elementssegment
has more than one element. If not specified, segment value
in the result is set to "mixed"
(if all segments are listed, it is set to "all"
)."hist"
for histogram, "rank"
for rank abundance/occurence curves and
"biplot"
for plot abundance vs. occurence data.TRUE
, add rug to the plot (default is FALSE
). It has effect only if
type="hist"
.TRUE
, plotted values are $log10(y+1)$ transformed.
Default FALSE
leaves the values intact."all"
.data
.data
.data
.data
.digits
value is inherited from the 'sscount' object
and used in crosstabulation. For large (>2) digit
values, computing time may take several seconds. Current implementation of handling measurement type data is based on the inflate
function, which is not fully vectorized.
The print
method produces 4 graphs in one window, displaying histograms (type = "hist"
) or rank abundance/incidence curves (type = "rank"
) of the vectors ninds
, srichn
,
specabund
and specoccur
. If the data are of presence/absence and not abundance type, only srichn
and specoccur
are displayed. These values are based on the function marmat
. The option (type = "biplot"
) deisplays 2 graphs, one for samples and one for species, combining presence/absence and abundance data in same plots.as.xcount
, check.attrib
, marmat
, mefa
,
sscount
, xorder
### Example 1: simple atrificial data
ss <- data.frame(
cbind(
c("sample1","sample1","sample2","sample2","sample3","sample4"),
c("species1","species1","species1","species2","species3","zero.count"),
c("male","female","male","female","male","male")
),
c(1, 2, 10, 3, 4, 1)
)
colnames(ss) <- c("sample.id", "species.id", "gender", "catch")
xc1 <- xcount(sscount(ss, zc="zero"))
xc1
xc2 <- xcount(sscount(ss, zc="zero.count"))
xc2
xc3 <- xcount(sscount(ss, zc="zero.count"), 0)
xc3
xc4 <- xcount(sscount(ss, zc="zero.count"), 1)
xc4
### Example 2: field data of the dolina
data(dol.count, dol.sample, landsnail)
dssc <- sscount(dol.count, zc="zero.count", fill=TRUE)
dssc
(xc <- xcount(dssc))
plot(xc, type="hist")
plot(xc, type="rank", logscale = TRUE)
plot(xc, type="biplot")
xcount(dssc, "broken")
xcount(dssc, c("adult", "juvenile"))
xcount(dssc, c(1,4), "mixed")
xcount(dssc, c(1:3))
Run the code above in your browser using DataLab