Skip to content

Commit

Permalink
define %||% for R before 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui authored Nov 13, 2024
1 parent 68efdbb commit 05568ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ verify_rstudio_version = function() {

str_trim = function(x) gsub('^\\s+|\\s+$', '', x)

if (getRversion() < '4.4.0') `%||%` = function(x, y) if (is.null(x)) y else x
output_md = function() getOption('bookdown.output.markdown', FALSE)

# a theorem engine for knitr (can also be used for lemmas, definitions, etc)
Expand Down

0 comments on commit 05568ab

Please sign in to comment.