= Stata Ds = '''`-ds-`''' lists variables. <> ---- == Usage == By default, `-ds-` simply returns the given variable list. {{{ ds foo bar baz }}} To list all variables not included in a given variable list, try the '''`not`''' option: {{{ ds foo bar baz, not }}} === Specification === Variables can be described by a specification and `-ds-` will return the list of variables matching (or not matching) it. {{{ ds, spec(type numeric) ds, not(type string) }}} Valid specifications for the '''`spec(spec)`''' and '''`not(spec)`''' options are: * `type typelist` * `format patternlist` * For example, `format %t*` selects all variables with a [[Stata/DataFormats#Date_and_Datetime_Data|datetime display format]] * `varlabel patternlist` * For example, `varlabel *temp*` selects all variables with a variable label including the word 'temp' * `vallabel patternlist` * `char patternlist` ---- == Stored Results == The list of selected variables is stored in `r(varlist)`, without any truncation or indentation. ---- == See also == [[https://www.stata.com/manuals/dds.pdf|Stata manual for -ds-]] ---- CategoryRicottone