object_name_message <- function(x){
cli::cli_inform("The object you passed is called {substitute(x)}")
}
object_name_message(letters)
#> The object you passed is called letters
Created on 2025-06-26 with reprex v2.1.1
object_name_message <- function(x){
cli::cli_inform("The object you passed is called {substitute(x)}")
}
object_name_message(letters)
#> The object you passed is called letters
Created on 2025-06-26 with reprex v2.1.1
object_name_message <- function(x){ | |
cli::cli_inform("The object you passed is called {substitute(x)}") | |
} | |
object_name_message(letters) |
Example of pluralisation, field name (argument) formatting, and a filepath: