Skip to content

Commit e8f1591

Browse files
committed
chore: Add control structures to eval_base_r_limted()
1 parent d1b61ef commit e8f1591

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎R/utils-r.R‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,26 @@ env_base_r_limited <- function(..., .parent_env = emptyenv()) {
177177
# Special values and NA handling
178178
anyNA = base::anyNA,
179179

180+
# Control structures
181+
ifelse = base::ifelse,
182+
`if` = base::`if`,
183+
`for` = base::`for`,
184+
`while` = base::`while`,
185+
`break` = base::`break`,
186+
`next` = base::`next`,
187+
`return` = base::return,
188+
`:` = base::`:`,
189+
`function` = base::`function`,
190+
`{` = base::`{`,
191+
`(` = base::`(`,
192+
193+
# Printing and output
194+
# print = base::print, # output isn't captured, so error if used
195+
# cat = base::cat, # TODO: use {evaluate} to run/capture output
196+
str = utils::str,
197+
summary = base::summary,
198+
format = base::format,
199+
180200
# Added functions
181201
...
182202
)

0 commit comments

Comments
 (0)