Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dropallfactors

Remove all factors in a data frame


Description

Remove all factors in a data frame

Usage

dropallfactors(x, unfac2num = FALSE, char2num = FALSE)

Arguments

x

data frame

unfac2num

default FALSE; whether try to convert all character to numeric; if FALSE, only try to convert column with factor attribute. Note that this can only transform the columns that may be transformed to numeric without using factor.

char2num

default FALSE; whether force all the character to be numeric class by using factor as an intermediate.

Value

data frame without factor

Examples

data("taxonomy_table_16S")
taxonomy_table_16S[, 1] <- as.factor(taxonomy_table_16S[, 1])
str(dropallfactors(taxonomy_table_16S))

microeco

Microbial Community Ecology Data Analysis

v0.10.0
GPL-3
Authors
Chi Liu [aut, cre], Felipe R. P. Mansoldo [ctb], Umer Zeeshan Ijaz [ctb], Chenhao Li [ctb], Yang Cao [ctb], Minjie Yao [ctb], Xiangzhen Li [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.