Title

drany 'drop any' - drop (existing) variables and/or observations

Syntax

drany varelist [if] [in] [, clear[(command-list)] ]

Description

drany works like drop, with two distinctions:

1) Terms in varelist that do not match existing variables are simply reported, they do not cause an error.

2) The clear option will drop command-generated variables (eg, _found) - after dropping any specified observations. For example, after finddata:

drany if !_found, cl

would drop any observations not found in the external file, and then drop the variable _found.

Options

clear drops descriptive variables that are left behind by various commands - eg, _found, _dups, _file (only my commands).

With no parameters, clear will cause all such variables to be dropped. Otherwise, clear(command-list) will drop only variables created by the specified commands; eg, clear(finddata).