📄 save.hlp
字号:
{smcl}
{* 07feb2005}{...}
{cmd:help save}, {cmd:help saveold}{right:dialogs: {bf:{dialog save_dlg:save}} {dialog save_option:save with options}}
{hline}
{title:Title}
{p2colset 5 17 19 2}{...}
{p2col :{hi:[D] save} {hline 2}}Save datasets{p_end}
{p2colreset}{...}
{title:Syntax}
{phang}
Save data in memory to file
{p 8 13 2}
{cmdab:sa:ve}
[{it:filename}]
[{cmd:,}
{it:{help save##save_options:save_options}}]
{phang}
Save data in memory to file in Stata 7 format
{p 8 16 2}
{cmd:saveold}
{it:filename}
[{cmd:,}
{it:{help save##saveold_options:saveold_options}}]
{synoptset 17}{...}
{marker save_options}
{synopthdr :save_options}
{synoptline}
{synopt :{opt nol:abel}}omit value labels from the saved dataset{p_end}
{synopt :{opt replace}}overwrite existing dataset{p_end}
{synopt :{opt all}}save {cmd:e(sample)} with the dataset; programmer's
option{p_end}
{synopt :{opt o:rphans}}save all value labels{p_end}
{synopt :{opt empty:ok}}save dataset even if zero observations and zero
variables{p_end}
{synopt :{opt intercooled}}write dataset in the Intercooled Stata format;
variables should be {ul:<} {opt str80}{p_end}
{synoptline}
{synoptset 17}{...}
{marker saveold_options}
{synopthdr :saveold_options}
{synoptline}
{synopt :{opt nol:abel}}omit value labels from the saved dataset{p_end}
{synopt :{opt replace}}overwrite existing dataset{p_end}
{synopt :{opt all}}save {cmd:e(sample)} with the dataset; programmer's
option{p_end}
{synopt :{opt intercooled}}write dataset in the Intercooled Stata format;
variables should be {ul:<} {opt str80}{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
Note that if your {it:filename} contains embedded spaces; remember to enclose
it in double quotes.{p_end}
{title:Description}
{pstd}
{opt save} stores the dataset currently in memory on disk under the name
{it:filename}. If {it:filename} is not specified, the name under which the
data were last known to Stata ({cmd:c(filename)}) is used. If {it:filename} is
specified without an extension, {cmd:.dta} is used.
{pstd}
{opt saveold} saves the dataset currently in memory on disk under the name
{it:filename} in Stata 7 format.
{pstd}
If you are using Stata 9 and want to save a file so that it may be
read by someone using Stata 8, simply use the {opt save} command.
Stata 8 and Stata 9 share the same {help dta:dataset format}. Stata 9
allows value labels to be up to 32,000 characters long. If Stata 8 tries
to read a Stata 9 dataset with value labels that exceed the Stata 8 limit
(244 for Stata/SE; 80 for Stata Intercooled), Stata 8 will ignore those labels
and read the rest of the dataset.
{title:Options}
{phang}
{opt nolabel} omits value labels from the saved dataset.
The associations between variables and value label names, however,
are saved along with the dataset and variable labels.
{phang}
{opt replace} permits {opt save} or {opt saveold}
to overwrite an existing dataset.
{phang}
{opt all} is for use by programmers. If specified, {cmd:e(sample)} will
be saved with the dataset. You could run a regression, {cmd:save mydata, all};
{cmd:drop _all}; {cmd:use mydata}; and {cmd:predict yhat if e(sample)}.
{phang}
{opt orphans} saves all value labels, including those not attached to
any variable.
{phang}
{opt emptyok} is a programmer's option. It specifies that the
dataset be saved, even if it contains zero observations and zero variables.
If {opt emptyok} is not specified and the dataset is empty, {opt save} responds
with the message "no variables defined".
{phang}
{opt intercooled} instructs Stata/SE to write the dataset in the
Intercooled Stata format, after verifying that there are no variables longer
than {opt str80}. You should seldom need this option.
{title:Examples}
{phang}{cmd:. save myfile}{p_end}
{phang}{cmd:. save myfile, replace}{p_end}
{phang}{cmd:. save, replace}{p_end}
{phang}{cmd:. saveold myfile}{p_end}
{phang}{cmd:. saveold myfile, replace}{p_end}
{title:Also see}
{psee}
Manual: {bf:[D] save}
{psee}
Online: {helpb compress},
{help dta},
{helpb fdasave},
{helpb outfile},
{helpb outsheet},
{helpb use},
{helpb xmlsave}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -