safe_dim: dim that works for vectors too

View source: R/utils.R

safe_dimR Documentation

dim that works for vectors too

Description

safe_dim tries to get dimensions from dim and falls back on length if dim returns NULL

Usage

safe_dim(x)

Arguments

x

the object to get dimensions from


tlverse/sl3 documentation built on Nov. 18, 2024, 12:46 a.m.