Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.ped

Is an object a ped object?


Description

Functions for checking whether an object is a ped() object, a singleton() or a list of such.

Usage

is.ped(x)

is.singleton(x)

is.pedList(x)

Arguments

x

Any R object.

Details

Note that the singleton class inherits from ped, so if x is a singleton, is.ped(x) returns TRUE.

Value

For is.ped(): TRUE if x is a ped or singleton object, otherwise FALSE.

For is.singleton(): TRUE if x is a singleton object, otherwise FALSE.

For is.pedList(): TRUE if x is a list of ped and/or singleton objects, otherwise FALSE.

Author(s)

Magnus Dehli Vigeland

See Also

Examples

x1 = nuclearPed(1)
x2 = singleton(1)
stopifnot(is.ped(x1), !is.singleton(x1),
          is.ped(x2), is.singleton(x2),
          is.pedList(list(x1,x2)))

pedtools

Creating and Working with Pedigrees and Marker Data

v0.9.7
GPL-3
Authors
Magnus Dehli Vigeland [aut, cre] (<https://orcid.org/0000-0002-9134-4962>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.