tapnet2df {tapnet}R Documentation

Convert tapnet object into data.frame

Description

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

Usage

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

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)


[Package tapnet version 0.3 Index]