R/names_from_expression.R

Defines functions names_from_expression

names_from_expression <- function(expr){
  if(is.call(expr)){
    expr |>
      as.list() |>
      utils::tail(-1) |>
      lapply(names_from_expression) |>
      unlist()
  }else if(is.symbol(expr)){
    as.character(expr)
  }
}

Try the csmbuilder package in your browser

Any scripts or data that you put into this service are public.

csmbuilder documentation built on Sept. 19, 2026, 1:06 a.m.