Learn R Programming

Momocs (version 1.2.9)

as_df: Converts Momocs objects to data.frames

Description

Used in particular for compatibility with the tidyverse

Usage

as_df(x)

# S3 method for Coo as_df(x)

# S3 method for Coe as_df(x)

# S3 method for TraCoe as_df(x)

# S3 method for PCA as_df(x)

# S3 method for LDA as_df(x)

Arguments

x

an object, typically a Momocs object

Value

a data.frame

See Also

Other bridges functions: bridges, complex, export

Examples

Run this code
# NOT RUN {
# smaller Out
lite_bot <- bot %>% slice(c(1, 2, 21, 22)) %>% coo_sample(12)
# Coo object
lite_bot %>% as_df %>% head
# Coe object
lite_bot %>% efourier(2) %>% as_df %>% head
# PCA object
lite_bot %>% efourier(2) %>% PCA %>% as_df %>% head
# LDA object
lite_bot %>% efourier(2) %>% PCA %>% LDA(~type) %>% as_df %>% head
# }

Run the code above in your browser using DataLab