Skip to content

Commit 187350c

Browse files
committed
remove @ usage in vignette
1 parent f18d55a commit 187350c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

vignettes/qenv.Rmd

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,17 @@ The feasibility of joining `qenv` objects hinges on the contents of the environm
122122

123123
### Warnings and messages in `qenv` objects
124124

125-
In cases where warnings or messages arise while evaluating code within a `qenv` environment, these are captured and stored within the `qenv` object. Access these messages and warnings using attributes of `@code` slot
125+
In cases where warnings or messages arise while evaluating code within a `qenv` environment, these are captured and stored within the `qenv` object. Access these messages and warnings using below
126126

127127
```{r}
128128
q_message <- eval_code(qenv(), quote(message("this is a message")))
129-
lapply(q_message@code, "attr", "messages")
129+
# get_messages(q_message) # TODO - this function does not exist
130130
131131
q_warning <- eval_code(qenv(), quote(warning("and this is a warning")))
132-
lapply(q_warning@code, "attr", "warnings")
132+
get_warnings(q_warning)
133133
```
134134

135-
If a particular line of code doesn't trigger any warnings or messages, the corresponding message/warning value will be `NULL`.
136-
137-
Additionally, a helper function, `get_warnings()`, is available to generate a formatted string comprising the warnings and the code responsible for generating them. It returns `NULL` when no warnings are present.
135+
If any of above returns `NULL`m then no warnings nor messages were present.
138136

139137
## Utilizing `qenv` inside `shiny` applications
140138

0 commit comments

Comments
 (0)