Skip to content

Commit

Permalink
Use deparse() to make ensure that "text" is chr
Browse files Browse the repository at this point in the history
  • Loading branch information
hsonne committed Apr 4, 2024
1 parent 6d269a2 commit 054c860
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/normalise_expression.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
normalise_expression <- function(x, collapse = " ")
{
if (!is.expression(x)) {

if (!is.character(x)) {
x <- deparse(x)
}

x <- parse(text = x, keep.source = TRUE)
}

Expand Down

0 comments on commit 054c860

Please sign in to comment.