Skip to content

Commit 3334bd8

Browse files
committed
chore: added r cleaning snippets
1 parent 802a4c2 commit 3334bd8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

R.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Simple neural networks](#simple-neural-networks)
1212
- [Measure time](#measure-time)
1313
- [Install TeX](#install-tex)
14+
- [Clean the R environment, console and history](#clean-the-r-environment-console-and-history)
1415

1516
## General
1617

@@ -84,3 +85,14 @@ proc.time() - ptm
8485
```R
8586
tinytex::install_tinytex(force = T)
8687
```
88+
89+
## Clean the R environment, console and history
90+
91+
```R
92+
# Cleanup the backend in RStudio:
93+
cat("\014") # Clears the console (imitates CTR + L)
94+
rm(list = ls()) # Clears the Global Environment/variables/data
95+
invisible(gc()) # Garbage collector/Clear unused RAM
96+
# Start coding now:
97+
print("Hello world! =)")
98+
```
File renamed without changes.

0 commit comments

Comments
 (0)