全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 LATEX论坛
1453 0
2015-09-30

功能和sweave类似,但更加全面,可以对包括R, SAS, Stata, S-Plus,matlab,maple等多种语言进行文字编程。下面是statweave手册上的一段介绍文字。


STATWEAVE is an extension of some previous literate-programming packages (SWEAVE,
SASWEAVE, and ODFWEAVE) for statistics. Its intent is to provide portable software that
can integrate code and documentation for a large variety of statistical (and nonstatistical)
languages and file formats, and also to provide for extensibility so that a user can add
more file formats and languages.
STATWEAVE is written in Java, providing easy portability across platforms. As currently
implemented, STATWEAVE has only a command-line interface, but a graphical interface
could be easily added. A Java virtual machine (JVM) is already installed on most
people’s systems, and the decision to use Java also separates STATWEAVE from requiring
the user to have any particular one of the statistical packages it supports.
In its current implementation, the supported languages include R, SAS, Stata, S-Plus,
Maple, LATEX, DOS, and UNIX; and more can easily be added. The currently supported file
formats are .tex (using an extension of SWEAVE’s LATEX syntax) and .odt (the Open Document
Format XML specification currently implemented in OpenOffice). The probable
next developments for file formats would be Word 2007’s .docx format, and extending
the .tex format to support SWEAVE’s noweb syntax.
To use STATWEAVE, one prepares a source file in the same basic format as the intended
output file. Computer code is added to this file, and marked in some way so that
STATWEAVE can tell that it is code in a certain language. These marked blocks of code are
called “code chunks.” Processing via STATWEAVE involves extracting and running the
code chunks in the appropriate program(s), and creating an output document that contains
all the materials in the source file, but embedding the code listings, output listings,
and any graphics produced in place of the code chunks. STATWEAVE figures out which
programs it needs to run, and runs them in order of first appearance in the source file.
Section 2 outlines how to install STATWEAVE on your system. Section 3 explains how
to run STATWEAVE from the command line, and the command-line options that are available.
In Section 4, we describe how to prepare a source file for STATWEAVE. Section 5
details the various options that can be specified in the source file for controlling how the
code chunks are processed and displayed. STATWEAVE uses a configuration file that defines
defaults for processing, specifies what languages are supported, provides paths to
these languages’ implementations on the local machine, etc. Section 7 explains the construction
of this file. Finally, STATWEAVE is designed to be extensible, and a separate
document1 describes the Java class structure and how various interfaces can be implemented
and configured to add support for new languages or file formats.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群