#|eval: false
sessionInfo()
## R version 4.2.1 (2022-06-23)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Catalina 10.15.7
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
##
## locale:
## [1] C
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## loaded via a namespace (and not attached):
## [1] htmlwidgets_1.5.4 compiler_4.2.1 magrittr_2.0.3 fastmap_1.1.0
## [5] cli_3.4.0 tools_4.2.1 htmltools_0.5.3 stringi_1.7.8
## [9] rmarkdown_2.16 knitr_1.40 stringr_1.4.1 xfun_0.33
## [13] digest_0.6.29 jsonlite_1.8.0 rlang_1.0.5 evaluate_0.16
8 Miscellaneous
8.1 Search and replace in markdown
If we want to search for the end of the line to, for example, add two spaces (and thus create a linebreak), we can:
- find `
(.)$
with Regex selected - and replace with
\1your_string
8.2 Print the session info:
This prints our session info (used R version, packages, etc) and is very important to store to reproduce our code for others
8.2.1 Clean-up the working environment
Notice: At the moment, we do not want to clean up the working directory, therefore, in our documentation we put a #
in front of it. If you want to run the code just remove the #
#rm(list = ls())