Learn R Programming

gson (version 0.2.1)

validate_gson: Validate a GSON object

Description

validate_gson() checks the core data contract of a GSON gene set collection. It is useful after constructing an object manually or reading one from an external source.

Usage

validate_gson(x, error = TRUE)

Value

TRUE if the object is valid. If error = FALSE, returns a character vector of validation messages when invalid.

Arguments

x

A GSON object.

error

Logical. If TRUE, throw an error when validation fails. If FALSE, return a character vector of validation messages.

Examples

Run this code
x <- gson(data.frame(gsid = "GS1", gene = "gene1"))
validate_gson(x)

Run the code above in your browser using DataLab