validate_cells: Validate cell-DF

View source: R/validate_cells.R

validate_cellsR Documentation

Validate cell-DF

Description

Validate cell-DF

Usage

validate_cells(dat)

Arguments

dat

An R object

Details

It checks for following facts:

  • Whether dat is a data.frame

  • Whether dat conforms to rc_df format

  • Whether dat conforms to cell_df format If all the checks are passed then it returns TRUE else it returns FALSE with msg attribute, indicating reason for validation failure.

Value

Logical scalar. If the value is FALSE, it will contain attribute named msg.

Examples

# returns TRUE
validate_cells(tibble::tibble(row = 1, col = 2, data_type = "numeric", value = "1"))

# this is FALSE
chk <- validate_cells(tibble::tibble(row = 1, col = 2, data_type = "numeric"))

# msg
attr(chk, "msg")

r-rudra/tidycells documentation built on July 19, 2022, 5:10 a.m.