NULL_to_NA: converts a NULL to NA; or returns the argument unchanged...

Description Usage Arguments Examples

View source: R/MzQC_classes.R

Description

This is useful for missing list elements (which returns NULL), but when the missing element in refClass should be NA (and NULL would return an error)

Usage

1
NULL_to_NA(var_or_NULL)

Arguments

var_or_NULL

A variable of any kind or NULL

Examples

1
2
3
4
  NULL_to_NA(NA)   ## NA
  NULL_to_NA(NULL) ## NA
  NULL_to_NA("hi") ## "hi"
  

PTXQC documentation built on June 2, 2021, 5:07 p.m.