The cell_df
class is a subclass of tbl_df
and data.frame
,
created in order to store cell level information.
cell_df
Objects of class cell_df
have:
A class
attribute of c("cell_df", "cells", "rc_df", "tbl_df", "tbl", "data.frame")
.
Two column of integer
type named row
and col
. All entries must be positive and not NA
.
This represents a cell address.
A column of character
type named data_type
. Which can contain only numeric
or character
as entries.
This represents the data type of the cell (classified to only two categories).
A column of character
type named value
. This stores value of corresponding cells.
Apart from these columns it can contain other columns.
However, (row
, col
) together should identify the row of the cell_df
uniquely.
cell_df
print
: Prints identifier of the class and the content of the underlying tibble.
summary
: Calculates basic stats like number of rows and columns, number of characters and numeric fields, density etc.
plot
: Plots (using ggplot2
) the cell information as ordinary table.
as.matrix
: This will transform the data back into tabular form and create a character matrix.
as.data.frame
: Similar to as.matrix
this will also transform the data back into tabular form.
The function validate_cells
which is used to validate cell_df
.
The as.matrix
and as.data.frame
method is similar to unpivotr::rectify
.
Object of this class is also compatible to most of the functions from unpivotr
package.