selectaxa: selectaxa

Description Usage Arguments Value Examples

View source: R/selectaxa.R

Description

Calculate the relative frequency of species in a dataframe and return a new dataframe containing species with a relative frequency higher than a user-selected treshold

Usage

1
selectaxa(x, fre_treshold = 50, start = 2)

Arguments

x

a dataframe

fre_treshold

relative frequency treshold

start

number of column of the first species of the dataframe

Value

a dataframe containing species above the specified treshold

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
   a <- seq(1,10,1)
   sp1 <- c(1,1,1,1,1,1,1,1,1,1)
   sp2 <- c(1,1,0,1,0,0,0,1,1,0)
   sp3 <- c(1,0,0,1,0,0,0,1,0,0)
   sp4 <- c(1,1,0,1,0,1,1,1,0,0)
   df <- data.frame(a,sp1,sp2,sp3,sp4)
   selectaxa(df)

## End(Not run)

ldbk/Rplanktonanalytic documentation built on June 29, 2021, 9:23 p.m.