Learn R Programming

tapnet (version 0.6)

tapnet2df: 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)

Value

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

Arguments

tapnetObject

results of applying fit_tapnet to the tapnet object;

Author

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

Details

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

References

Benadi et al. in prep

Examples

Run this code
ex <- simulate_tapnet(nlower=10, nhigher=50, ntraits_pem=3, ntraits_nopem=2, Nwebs = 3)
df <- tapnet2df(ex)
head(df)
if (FALSE) {
  library(ranger)
  frf <- ranger(interactions ~ ., data=df[, -c(1:2)], importance="impurity")
  sort(importance(frf), decreasing=TRUE)
}

Run the code above in your browser using DataLab