📄 ssc.hlp
字号:
{smcl}
{* 18mar2005}{...}
{cmd:help ssc}
{hline}
{title:Title}
{p2colset 5 16 18 2}{...}
{p2col:{hi:[R] ssc} {hline 2}}Install and uninstall packages from SSC{p_end}
{p2colreset}{...}
{title:Syntax}
{phang}
Summary of packages most recently added or updated at SCC
{p 8 12 2}
{cmd:ssc}
{opt what:snew}
[{cmd:,}
{opt sav:ing}{cmd:(}{it:filename}[{cmd:,} {opt replace}]{cmd:)}
{opt type}]
{phang}
Describe a specified package at SSC
{p 8 12 2}
{cmd:ssc}
{opt d:escribe}
{c -(} {it:pkgname} | {it:letter} {c )-}
[{cmd:,}
{cmd:saving(}{it:filename}[{cmd:, replace}]{cmd:)}]
{phang}
Install a specified package from SSC
{p 8 12 2}
{cmd:ssc}
{opt inst:all}
{it:pkgname}
[{cmd:,}
{opt all}
{opt replace}]
{phang}
Uninstall from your computer a previously installed package from SSC
{p 8 12 2}
{cmd:ssc}
{opt uninstall}
{it:pkgname}
{phang}
Type a specific file stored at SSC
{p 8 12 2}
{cmd:ssc}
{opt type}
{it:filename}
{phang}
Copy a specific file from SSC to your computer
{p 8 12 2}
{cmd:ssc}
{opt copy}
{it:filename}
[{cmd:,}
{opt pl:us}
{opt p:ersonal}
{opt replace}
{opt pub:lic}
{opt bin:ary}]
{p 4 6 2}
where {it:letter} in {opt ssc describe} is {opt a}-{opt z} or {opt _}.
{title:Description}
{pstd}
{opt ssc} works with packages (and files) from the Statistical Software
Components (SSC) archive, which is often called the Boston College Archive and
is provided by {browse "http://www.repec.org"}.
{pstd}
The SSC has become the premier Stata download site for user-written software
on the web. {opt ssc} provides a convenient command-line interface to the
resources available there. For example, on
{browse "http://www.stata.com/support/statalist":Statalist}, users will often
write
{p 8 8 4}
The program can be found by typing {cmd:ssc install newprogramname}.
{pstd}
Typing that would load everything associated with {cmd:newprogramname},
including the help files, if a package of that name existed. Since there is
no package named {cmd:newprogramname}, typing the above literally would just
produce an error message, but no harm would be done.
{pstd}
If you are searching for what is available, see {helpb search}.
{opt search} searches and provides a GUI interface from which programs can be
loaded, including the programs at the SSC archive.
{title:Jargon and concepts}
{pstd}
A new command to Stata is implemented as one or more {bf:ado-files}, and
together with their corresponding {bf:help files} and any other associated
files, they form a {bf:package}.
{pstd}
Packages are available at SSC. Packages are named. When you type
{cmd:. ssc install outreg}
{pstd}
all the files associated with the package named {hi:outreg} are downloaded and
installed at your computer. Usually names correspond to the name of the
command being added to Stata, and so one would expect installing the package
{hi:outreg} would add new command {cmd:outreg} to your computer and that
typing "{cmd:help outreg}" would provide the online help. That is indeed the
situation in this case, but that is not always so. Before or after installing
a package, it is a good idea to type "{cmd:ssc describe} {it:pkgname}" to find
out the details.
{title:Command overview}
{phang}
{opt ssc whatsnew} summarizes the packages made available or
updated recently. Output is presented in the Stata Viewer, and from
there you may click to find out more or install.
{phang}
{opt ssc describe} {it:pkgname} describes, but does not install, the specified
package. Use {helpb search} to find packages. If you know the package
name but do not know the exact spelling, type {opt ssc describe} followed
by one letter, {opt a}-{opt z} or {opt _} (underscore), to
list all the packages starting with that letter.
{phang}
{opt ssc install} {it:pkgname} installs the specified package. You do not
have to describe a package before installing it. You may also
install a package using {helpb net}.
{phang}
{opt ssc uninstall} {it:pkgname} removes the previously installed
package from your computer. It does not matter whether the package was
installed using {opt ssc install} or using some other method, such as
{helpb net}. ({opt ssc uninstall} is a synonym for {opt ado uninstall}, so
it can uninstall any installed package, not just packages obtained from
SSC.)
{phang}
{opt ssc type} {it:filename} types a specific file stored at SSC.
{opt ssc cat} is a synonym for {opt ssc type}, which may appeal to those
familiar with Unix.
{phang}
{opt ssc copy} {it:filename} copies a specific file stored at SSC to your
computer. By default, the file is copied to the current directory, but
you can use options to change this. {opt ssc copy} is a rarely used
alternative to {opt ssc install} ...{cmd:, all}. {opt ssc cp} is a
synonym for {opt ssc copy}.
{title:Options for use with ssc whatsnew}
{phang}
{cmd:saving(}{it:filename}[{cmd:, replace}]{cmd:)} specifies the "what's new"
summary be saved in {it:filename}. If {it:filename} is specified
without a suffix, {it:filename}{cmd:.smcl} is assumed. If {opt saving()}
is not specified, {cmd:saving(ssc_result.smcl)} is assumed.
{phang}
{opt type} specifies that the "what's new" results be displayed in the
Results window rather than in the Viewer.
{title:Option for use with ssc describe}
{phang}
{cmd:saving(}{it:filename}[{cmd:, replace}]{cmd:)} specifies that, in addition
to the description's being displayed on your screen, it be saved in
the specified file.
{pmore}
If {it:filename} is specified without an extension, {opt .smcl} will be
assumed, and the file will be saved as a {help smcl:SMCL} file.
{pmore}
If {it:filename} is specified with an extension, then no default extension
is added. If the extension is {opt .log}, the file will be stored as
an ASCII text file.
{pmore}
If {opt replace} is specified, {it:filename} is replaced if it already
exists.
{title:Options for use with ssc install}
{phang}
{opt all} specifies that any ancillary files associated with the
package be downloaded to your current directory, in addition
to the program and help files being installed. Ancillary files are files
that do not end in {opt .ado} or {opt .hlp}, and typically contain datasets
or examples of the use of the new command.
{pmore}
You can find out which files are associated with the package by typing
{cmd:ssc describe} {it:pkgname} before or after installing. If you
install without using the {opt all} option and then want the ancillary
files, you can {opt ssc install} again.
{phang}
{opt replace} specifies that any files being downloaded that already exist
on your computer be replaced by the downloaded files. If
{opt replace} is not specified and any files already exist, none of the
files from the package is downloaded or installed.
{pmore}
It is better not to specify the {opt replace} option and wait to see if
there is a problem. If there is a problem, it is usually better to
uninstall the old package using {opt ssc uninstall} or
{helpb ado:ado uninstall} (which are, in fact, the same command).
{title:Options for use with ssc copy}
{phang}
{opt plus} specifies that the
file be copied to the PLUS directory, the directory where
user-written additions are installed. Typing {helpb sysdir}
will display the identity of the PLUS directory on your computer.
{phang}
{opt personal} specifies that the file be copied to your PERSONAL
directory as reported by {helpb sysdir}.
{pmore}
If neither {opt plus} nor {opt personal} are specified,
the default is to copy the file to the current directory.
{phang}
{opt replace} specifies that, if the file already exists on your computer,
the new file replace it.
{phang}
{opt public} specifies that the new file be made readable by everyone;
otherwise, the file will be created according to the default permission you
have set with your operating system.
{phang}
{opt binary} specifies that the file being copied is a binary file and that it
is to be copied as is. The default is to assume that the file is a text
file and change the end-of-line characters to those appropriate for your
computer/operating system.
{title:Examples}
{cmd:. ssc whatsnew}
{cmd:. ssc describe outreg}
{cmd:. ssc describe outreg, saving(outreg.log)}
{cmd:. ssc describe o}
{cmd:. ssc describe o, saving(o.index)}
{cmd:. ssc install outreg}
{cmd:. ssc uninstall outreg}
{cmd:. ssc type whitetst.hlp}
{cmd:. ssc copy whitetst.ado}
{title:Also see}
{psee}
Manual: {bf:[R] ssc}
{psee}
Online: {helpb net}, {helpb search}, {help sj},
{help statalist}, {helpb sysdir}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -