R/str2expression.R

Defines functions str2expression

Documented in str2expression

#' @title Backport of str2expression for R < 3.6.0
#' @rdname str2expression
#'
#' @description
#' See the original description in \code{base::str2expression}.
#'
#' @keywords internal
#' @rawNamespace if (getRversion() < "3.6.0") export(str2expression)
#' @examples
#' # get function from namespace instead of possibly getting
#' # implementation shipped with recent R versions:
#' str2expression <- getFromNamespace("str2expression", "backports")
#'
#' str2expression("x[3] <- 1+4")
str2expression <- function(text) parse(text=text, keep.source=FALSE)

Try the backports package in your browser

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

backports documentation built on June 24, 2024, 5:24 p.m.