{smcl} {* 2 Feb 2001}{...} {hline} help for {hi:ds2}{right:(STB-60: dm78.1)} {hline} {title:Describe variables in memory} {p 8 16}{cmd:ds2} [{it:varlist}] [{cmd:,} {c -(} {cmdab:n:umeric} {cmdab:s:tring} {c |} {cmdab:t:ype(}{it:vartype}{cmd:)} {c )-} {c -(} {cmdab:h:asval(}{c -(}{cmd:a}{c |}{cmd:y}{c |}{cmd:u}{c |}{cmd:n}{c )-}{cmd:)} {c |} {cmdab:w:ithval(}{it:value_label_name}{cmd:)} {c )-} {cmdab:d:etail} ] {title:Description} {p}{cmd:ds2} lists variable names in a compact format (or optionally, in the same format as {cmd:describe}). It is a variant on {cmd:ds}. {title:Options} {p 0 4}{cmd:numeric} specifies that only numeric variables should be listed. {p 0 4}{cmd:string} specifies that only string variables should be listed. {p 0 4} {cmd:type(}{it:vartype}{cmd:)} specifies that only variables of type {it:vartype} should be listed. {cmd:type( )} may be abbreviated down to as few as one character for {cmd:b}yte, {cmd:i}nt, {cmd:l}ong, {cmd:f}loat and {cmd:d}ouble. {cmd:string} or any abbreviation of it means string variables of any length, so that {cmd:type(str)} is equivalent to {cmd:string}. {cmd:type( )} may not be combined with {cmd:numeric} or {cmd:string}. {p 0 4} {cmd:hasval(}{c -(}{cmd:a}{c |}{cmd:y}{c |}{cmd:u}{c |}{cmd:n}{c )-}{cmd:)} specifies that variables with or without value labels attached should be listed. {cmd:hasval(a)} or {cmd:hasval(y)} means attached and {cmd:hasval(u)} or {cmd:hasval(n)} means unattached. The variables listed will be a subset of those otherwise specified. {cmd:t(int) h(a)} means {cmd:int} variables with value labels attached. {p 0 4} {cmd:withval(}{it:value_label_name}{cmd:)} specifies that variables with value label {it:value_label_name} attached should be listed. The variables listed will be a subset of those otherwise specified. {p 0 4} {cmd:hasval( )} and {cmd:withval( )} may not be combined. {p 0 4} {cmd:detail} specifies that a more detailed listing should be given. {cmd:ds2, s d} is equivalent to {cmd:describe} with all the string variables. {cmd:ds2, n d} is equivalent to {cmd:describe} with all the numeric variables. {title:Saved results} {cmd:ds2} saves in {cmd:r(varlist)} the names of the variables listed. {title:Examples} {p 4 8}{inp:. ds2, s} {p 4 8}{inp:. ds2, s d} {p 4 8}{inp:. ds2, n} {p 4 8}{inp:. order `r(varlist)'} {p 4 8}{inp:. ds2, n} {p 4 8}{inp:. su `r(varlist)'} {p 4 8}{inp:. ds2, s} {p 4 8}{inp:. edit `r(varlist)'} {p 4 8}{inp:. ds2, t(float)} {p 4 8}{inp:. ds2, t(str16)} {p 4 8}{inp:. ds2, w(origin)} {title:Author} Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk {title:Acknowledgement} Jay Kaufman's suggestions led to {cmd:type()} and {cmd:withval()} options. {title:Also see} On-line: help for {help describe} Manual: {hi:[R] describe}, {hi:[R] saved results}