Skip to content

Commit 186f8ca

Browse files
author
Filip Schouwenaars
committed
execute embedded R script in specified env
1 parent 001db74 commit 186f8ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/Attributes.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ sourceCpp <- function(file = "",
196196
if (embeddedR && (length(context$embeddedR) > 0)) {
197197
srcConn <- textConnection(context$embeddedR)
198198
setwd(rWorkingDir) # will be reset by previous on.exit handler
199-
source(file=srcConn, echo=TRUE)
199+
source(file = srcConn, local = env, echo = TRUE)
200200
}
201201

202202
# cleanup the cache dir if requested

0 commit comments

Comments
 (0)