clear
Throws away the dataset in memory.
What we have
- emptying the data in memory
clearas an option onuse,sysuseandimport
Coming later
- clearing the macros on their own —
macro drop _allis the one that does that
How you write it
clear
Square brackets mean optional. A vertical bar means choose one.
What it does
Starts you from nothing. Mostly you will not type it on its own — you will add it to use or sysuse as an option, which does the same job in one step.
Watch out. There is no undo. Anything you have not saved is gone.
Try it
Every example below was run after sysuse vira.sample02, clear.
. clear
The same thing in pandas and in R
R
df <- NULL # This R has NOT been run against a real R yet: read it as documentation.