In my r markdown file, I am outputting to html. In the code, I include"
{r, fig.align= "center", message= FALSE, warning= FALSE}
This removes all warnings and messages except this one:
## <environment: R_GlobalEnv>
Somewhere in the code I convert a list to objects in the environment with:
list2env(a1, envir = .GlobalEnv)
So I understand where the message is coming from but do not understand why it is not being removed by message = FALSE, warning = FALSE
Any suggetions?
That's not a message, it's the output of list2env().
Note: Don't run the following line if you don't want new objects in your global environment.
list2env(mtcars, .GlobalEnv)
# <environment: R_GlobalEnv>
You can suppress the output of a function by wrapping it with invisible().
invisible(list2env(a1, envir = .GlobalEnv))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With