| fit_rf | R Documentation | 
Fits a random forest, where given response column in pheno data is predicted using the features. Can be used
both for classification and regression. For more information,
see the documentation of randomForest::randomForest.
After fitting the random forest, use rf_importance as a shortcut for getting the feature importance
in random forest prediction.
fit_rf(
  object,
  y,
  all_features = FALSE,
  covariates = NULL,
  importance = TRUE,
  ...
)
| object | a MetaboSet object | 
| y | character, column name of phenoData giving the dependent variable of the model | 
| all_features | logical, should all features be included in the model? if FALSE, flagged features are left out | 
| covariates | character, column names of pData to use as covariates in the model, in addition to molecular features | 
| importance | Should importance of features be assessed? | 
| ... | other parameters passed to  | 
An object of class randomForest
randomForest, importance_rf
rf <- fit_rf(example_set, y = "Group")
rf
importance_rf(rf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.