isHomoList: Determines whether a list is homogenous

View source: R/misc.R

isHomoListR Documentation

Determines whether a list is homogenous

Description

If a list contains objects of the same class with the given class name, we call it a homogenous list and the function returns TRUE, otherwise it returns FALSE.

Usage

isHomoList(list, class)

Arguments

list

A list

class

The class name to be validated

Value

logical

Author(s)

Jitao David Zhang mailto:jitao_david.zhang@roche.com

Examples

testlist <- list("home1"="Hamburg","home2"="Heidelberg",
"home3"="Tianjin")
isHomoList(testlist,"character")
testlist$lucky <- 16
isHomoList(testlist,"character")

Accio/KEGGgraph documentation built on Jan. 13, 2023, 1:03 p.m.