tapnet2df: Convert tapnet object into data.frame

Description Usage Arguments Details Value Author(s) References Examples

View source: R/tapnet2df.R

Description

Function allows direct use of data prepared for tapnet analysis by other statistical methods, e.g. regression approaches

Usage

1
tapnet2df(tapnetObject)

Arguments

tapnetObject

results of applying fit_tapnet to the tapnet object;

Details

This function simply puts all data into a data.frame, with each row an entry in the network matrix.

Value

A data.frame containing network observations, PEMs, traits and abundances for regression-type analysis.

Author(s)

Carsten Dormann <carsten.dormann@biom.uni-freiburg.de>

References

Benadi et al. in prep

Examples

1
2
3
4
5
6
7
8
9
ex <- simulate_tapnet(nlower=10, nhigher=50, ntraits_pem=3, ntraits_nopem=2, Nwebs = 3)
df <- tapnet2df(ex)
head(df)
## Not run: 
  library(ranger)
  frf <- ranger(interactions ~ ., data=df[, -c(1:2)], importance="impurity")
  sort(importance(frf), decreasing=TRUE)

## End(Not run)

tapnet documentation built on Jan. 28, 2021, 5:06 p.m.