is_hdesc: Checks for describe objects

View source: R/htypes.R

is_hdescR Documentation

Checks for describe objects

Description

These two function are useful to test if an object is of class [Hmisc][Hmisc::describe].

Usage

is_hdesc(x)

is_single_hdesc(x)

Arguments

x

an object to test if it is of class 'describe'.

Details

In 'Hmisc' both "single" 'describe' objects and lists of them are of class 'describe'. In particular, even if 'Hmisc::describe()' results in a single variable description, it is directly the "single" 'describe' object and not a list of them with only a single 'describe' object included!

'is_hdesc()' test for general inheritance.

'is_single_hdesc()' test for single instance of a 'describe' object.

Value

(lgl) is 'x' (a single element or a general) 'describe' object?

See Also

[describe][Hmisc::describe]

[is_hcat], [is_hcon], [htype], [htypes]

Examples


  library(Hmisc)
  desc <- describe(mtcars)

  is_hdesc(desc) # TRUE
  is_hdesc(desc[[1L]]) # TRUE


  is_single_hdesc(desc) # FALSE
  is_single_hdesc(desc[[1L]]) # TRUE


depigner documentation built on April 24, 2023, 5:08 p.m.