empty_to_na {gwasrapidd}R Documentation

Converts an empty vector to a scalar NA

Description

This function converts an empty vector to a scalar NA of the same type as the input.

Usage

empty_to_na(x)

Arguments

x

An atomic vector, of one of these types: character, integer, double or logical.

Value

An atomic vector of the same type as x. If x is empty then NA is returned, otherwise x is returned as is.


[Package gwasrapidd version 0.99.17 Index]