xpose.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 102 行
HLP
102 行
{smcl}
{* 03mar2005}{...}
{cmd:help xpose}{right:dialog: {bf:{dialog xpose}}}
{hline}
{title:Title}
{p2colset 5 18 20 2}{...}
{p2col :{hi:[D] xpose} {hline 2}}Interchange observations and variables{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 14 2}{cmd:xpose, clear} [{it:options}]
{synoptset 15}{...}
{synopthdr}
{synoptline}
{synopt :{opt clear}}reminder that untransposed data will be lost if not previously saved{p_end}
{synopt :{opt f:ormat}}use largest numeric display format from untransposed data{p_end}
{synopt :{opth f:ormat(%fmt)}}apply specified format to all variables in transposed data{p_end}
{synopt :{opt v:arname}}add variable {opt _varname} containing original variable names{p_end}
{synopt :{opt prom:ote}}use the most compact data type that preserves numeric accuracy{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
* {cmd:clear} is required.
{p_end}
{title:Description}
{pstd}
{cmd:xpose} transposes the data, changing variables into observations and
observations into variables. All new variables{hline 2}that is, those created
by the transposition{hline 2}are made the default storage type. Thus any
original variables that were strings will result in observations containing
missing values. (If you transpose data twice, you will lose the contents of
string variables.)
{title:Options}
{phang}
{opt clear} is required and is supposed to remind you that the
untransposed data will be lost (unless you have saved the data previously).
{phang}
{opt format} specifies that the largest numeric display format from your
untransposed data be applied to the transposed data.
{phang}
{opth format(%fmt)} specifies that the specified numeric
display format to be applied to all variables in the transposed data.
{phang}
{opt varname} adds the variable {hi:_varname} to the transposed data
containing the original variable names. In addition, with or without the
{cmd:varname} option, if the variable {hi:_varname} exists in the dataset
before transposition, those names will be used to name the variables after
transposition. Thus transposing the data twice will (almost) yield the
original dataset.
{phang}
{opt promote} specifies that the transposed data use the most compact
numeric {help data types:data type} that preserves the original data accuracy.
{pmore}
If your data contain any variables of type {opt double}, all variables
in the transposed data will be of type {opt double}.
{pmore}
If variables of type {opt float} are present, but there are no variables of
type {opt double} or {opt long}, the transposed variables will be of type
{opt float}. If variables of type {opt long} are present, but there are no
variables of type {opt double} or {opt float}, the transposed variables will
be of type {opt long}.
{title:Examples}
{phang}{cmd:. xpose, clear varname}
{phang}{cmd:. xpose, clear varname format}
{phang}{cmd:. xpose, clear varname format("%15.0f")}
{phang}{cmd:. xpose, clear varname format promote}
{phang}{cmd:. xpose, clear format("%14.0f") promote}
{title:Also see}
{psee}
Manual: {bf:[D] xpose}
{psee}
Online: {helpb reshape}, {helpb stack}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?