Skip to content

Commit 998c507

Browse files
committed
clarify that deep assign does not update in current envir
1 parent f8259cc commit 998c507

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

01-intro.Rmd

+5-4
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,12 @@ mean(1:10)
321321

322322
- `<-` assigns/creates in the current environment
323323

324-
- `<<-` (deep assignment) never creates a variable in the current
325-
environment, but modifies an existing variable in the current or
326-
first enclosing environment where that name is defined.
324+
- `<<-` (deep assignment) never creates/updates a variable in the
325+
current environment, but modifies an existing variable in the
326+
current or first enclosing environment where that name is defined.
327327

328-
- If `<<-` does not find the name, it will create the variable in the global environment.
328+
- If `<<-` does not find the name, it will create the variable in the
329+
global environment.
329330

330331
```{r, eval=TRUE}
331332
library("fortunes")

01-intro.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,12 @@ mean(1:10)
348348

349349
- `<-` assigns/creates in the current environment
350350

351-
- `<<-` (deep assignment) never creates a variable in the current
352-
environment, but modifies an existing variable in the current or
353-
first enclosing environment where that name is defined.
351+
- `<<-` (deep assignment) never creates/updates a variable in the
352+
current environment, but modifies an existing variable in the
353+
current or first enclosing environment where that name is defined.
354354

355-
- If `<<-` does not find the name, it will create the variable in the global environment.
355+
- If `<<-` does not find the name, it will create the variable in the
356+
global environment.
356357

357358

358359
```r

0 commit comments

Comments
 (0)