Learn R Programming

tidycells (version 0.2.2)

as_cell_df: Transform data into Cell-DF Structure

Description

Transform an R object (mostly matrix or data.frame) into a cell_df for further processing in other tidycells functions.

Usage

as_cell_df(d, take_row_names = FALSE, take_col_names = FALSE)

Arguments

d

the data (either a matrix with column name or a data.frame)

take_row_names

consider row names as separate cells (applicable only for data with no (row, col) information). Default is FALSE.

take_col_names

consider column names as separate cells (applicable only for data with no (row, col) information). Default is FALSE.

Value

An object of class cell_df.

Note: After this, you may like to do Value Attribute Classification.

See Also

Examples

Run this code
# NOT RUN {
as_cell_df(iris)

# consider column name as cell
as_cell_df(iris, take_col_names = TRUE)

# if the data is already in a similar format it will not further transform
# which is not true for ---> unpivotr::as_cells
# check ---> unpivotr::as_cells(iris) %>% unpivotr::as_cells()
unpivotr::as_cells(iris) %>% as_cell_df()
# }

Run the code above in your browser using DataLab