powered by
ped
Functions for checking whether an object is a ped() object, a singleton() or a list of such.
ped()
singleton()
is.ped(x)is.singleton(x)is.pedList(x)
is.singleton(x)
is.pedList(x)
For is.ped(): TRUE if x is a ped or singleton object, otherwise FALSE.
is.ped()
x
singleton
For is.singleton(): TRUE if x is a singleton object, otherwise FALSE.
is.singleton()
For is.pedList(): TRUE if x is a list of ped and/or singleton
is.pedList()
objects, otherwise FALSE.
Any R object.
R
Magnus Dehli Vigeland
Note that the singleton class inherits from ped, so if x is a singleton, is.ped(x) returns TRUE.
is.ped(x)
x1 = nuclearPed(1) x2 = singleton(1) stopifnot(is.ped(x1), !is.singleton(x1), is.ped(x2), is.singleton(x2), is.pedList(list(x1,x2)))
Run the code above in your browser using DataLab