READ STACKED VARIABLES
Name:
Type:
Purpose:
Reads a list of variables into a single response variable
and a corresponding group-id variable.
Description:
A number of Dataplot commands expect data in the form
where Y is a response variable and X is a
group-id variable. For example,
BOX PLOT Y X
MEAN PLOT Y X
However, many data files are in the form where the data for
each group is stored as a separate column. The command
READ STACKED VARIABLES can be used to read these files into
the Y X format needed by many Dataplot commands.
Syntax:
READ STACKED VARIABLES <file> <y> <groupid>
<var-list>
where <file> is the name of a data file;
<y> is the response variable where the data will be
saved;
<groupid> is a variable that identifies the group for
each row of the response variable;
and <var-list> is a list of one or more variables to read
from the data file.
The file name is optional. If the file name is omitted, the
read will be from the terminal (until an END OF DATA is
entered).
The first variable read will have a group-id value of 1,
the second variable read will have a group-id value of 2
and so on.
Examples:
READ STACKED VARIABLES FILE.DAT Y GROUP X1 X2
READ STACKED VARIABLES FILE.DAT Y GROUP X1 X2 X3
READ STACKED VARIABLES FILE.DAT Y GROUP X1 X2 X3 X4
Note:
This command is similar to the READ MATRIX TO VARIABLES
command. The distinction is that the READ MATRIX TO VARIABLES
returns both a row-id and a column-id variable. The
READ STACKED VARIABLES just returns a group-id variable
(i.e., a column-id).
The STACK command is also similar. However, it works on
variables that have already been read into Dataplot.
Note:
By default, DATAPLOT does free format reads. However, it has the
capability for supporting FORTRAN style formats. Formatted reads
can be about 10 times faster on many systems. This can be helpful
for large data files. Enter HELP READ FORMAT for more details.
Note:
Blank lines in data files are ignored.
Note:
DATAPLOT supports the ability to embed comment lines within
the data file. Enter HELP COMMENT CHECK for details.
Note:
In order to determine whether the first argument is a file name or
a variable name, it looks for a period in the name. If it finds
one, it assumes a file name. If it does not, it assumes a variable
name. If your file name does not contain a period, attach a
trailing period (no spaces) to the file name on the
READ STACKED VARIABLES command.
Note:
DATAPLOT has no restrictions on the file name other than it be a
valid file name on the local operating system and that it contain
a period "." in the file name itself or as a trailing character.
DATAPLOT strips off trailing periods on those systems where it is
appropriate to do so. On systems where trailing periods can be a
valid file name (e.g., Unix), DATAPLOT tries to open the file with
the trailing period. If this fails, it then tries to open the file
with the trailing period stripped off.
Some users prefer to give all data files a ".DAT" or ".dat"
extension. Although this is a useful method for keeping track of
data files, it is strictly a user convention and is not enforced
by DATAPLOT in any way.
Note:
File names are case sensitive on Unix file systems. For Unix,
DATAPLOT attempts to open the file as given. If this fails, it
attempts to open the file as all upper case characters. If this
fails, it attempts to open the file as all lower case characters.
All other currently supported systems are not case sensitive
regarding file names.
As a further caution for Unix hosts, certain expansion characters
(specifically ~ to refer to your home directory) are interpreted
by the shell and are not recognized by the Fortran compiler. These
expansion characters are interpreted as literal characters and do
not yield the intended file name.
Default:
Synonyms:
Related Commands:
Applications:
Implementation Date:
Program:
SKIP 25
READ STACKED VARIABLES MONTGOME.DAT Y GROUP X1 X2 X3
.
TITLE Mean Plot
TITLE OFFSET 2
TITLE CASE ASIS
XLIMITS 1 3
TIC OFFSET UNITS DATA
XTIC OFFSET 0.5 0.5
MAJOR XTIC MARK NUMBER 3
MINOR XTIC MARK NUMBER 0
XTIC MARK LABEL FORMAT ALPHA
XTIC MARK LABEL CONTENT Large Medium Small
TIC MARK LABEL CASE ASIS
Y1LABEL Mean Percentage
X1LABEL Group
LABEL CASE ASIS
CHARACTER X BLANK
LINE BLANK SOLID
.
MEAN PLOT Y GROUP
Privacy
Policy/Security Notice
Disclaimer |
FOIA
NIST is an agency of the U.S.
Commerce Department.
Date created: 01/06/2009
Last updated: 11/04/2015
Please email comments on this WWW page to
[email protected].
|
|