Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Statscraft 0.61.0, release v0.61.0

Data files and dictionary

命令功能 {#what-it-does}
GETRead a data file and make it the active dataset.
GET DATARead a text data file, a sheet of a workbook or a dataset of an OpenStatSpec database as the active dataset.
GET TRANSLATERead a tab-delimited text file, a dBASE file or an old Excel workbook.
GET STATARead a Stata data file (.dta) and make it the active dataset.
IMPORTRead a portable (.por) file and make it the active dataset.
SYSFILE INFOShow the dictionary of a data file without opening it as the active dataset.
SAVEWrite the active dataset to a data file.
SAVE TRANSLATEWrite the active dataset to a CSV or tab-delimited text file, an Excel workbook, a Stata file, a SAS transport file or a dBASE file.
SAVE CODEPAGEWrite the active dataset to a data file whose text is in a code page.
EXPORTWrite the active dataset to a portable (.por) file.
XSAVEWrite the cases to a data file as the next data pass reads them.
NEW FILEStart a new, empty active dataset.
ADD CASEA Statscraft extension: one blank case after the last case of the active dataset.
ADD FILESAppend the cases of several data files, matching variables by name.
MATCH FILESCombine the variables of several data files case by case or by key.
STAR JOINAdd the fields of lookup files to every case of a data file, by keys, as an SQL left join.
UPDATEReplace values of a primary file with the values of transaction files, by key.
COMPARE DATASETSCompare the values and dictionary of the active dataset with another dataset or .sav file.
VARIABLE LABELSSet the labels of variables.
VALUE LABELSReplace the value labels of variables.
MISSING VALUESDeclare user-missing values.
VARIABLE LEVELSet the measurement level of variables.
VARIABLE WIDTHSet how many characters wide variables show in the data grid.
FORMATSSet the display format of variables.
PRINT FORMATSSet the print format of variables: how procedures and PRINT show them.
WRITE FORMATSSet the write format of variables: how WRITE writes them.
RENAME VARIABLESChange the names of variables.
DELETE VARIABLESRemove variables from the dataset.
SORT CASESSort the cases by the values of variables.
SORT VARIABLESPut the variables in order by a property of their dictionary entries.
SHIFT VALUESNew variables that hold the value of the same variable in an earlier or later case.
WEIGHTWeight the cases by a variable, or turn weighting off.
AGGREGATEAggregate groups of cases into new variables or a new dataset.
VARSTOCASESTurn groups of variables into cases: one new case per variable of the group.
CASESTOVARSTurn groups of cases into one case each, with a variable per value of an index.
FLIPTranspose the data: variables become cases and cases become variables.
ADD VALUE LABELSAdd or change value labels, keeping the other labels of the variables.
FILE LABELSet the label of the data file.
DOCUMENTAdd free text to the documents of the data file.
ADD DOCUMENTAdd quoted lines to the documents of the data file.
DROP DOCUMENTSRemove the documents of the data file.
VARIABLE ROLESet the role of variables for dialogs.
VARIABLE ALIGNMENTSet the alignment of variables in the data grid.
VARIABLE ATTRIBUTESet or delete custom attributes of variables.
DATAFILE ATTRIBUTESet or delete custom attributes of the data file.
ALTER TYPEChange the type, string width or format of variables.
APPLY DICTIONARYCopy dictionary information from a data file or dataset to the active dataset.
DATA LISTDefine text data, inline or in a file, and read it as the new active dataset.
KEYED DATA LISTRead variables from the record of a text file that a key variable picks, for each case.
BEGIN DATAInline data for the DATA LIST before it, up to a line that holds END DATA.
MATRIX DATARead matrix materials (correlations, means, counts) as a matrix data file.
MCONVERTMatrix data between covariances and correlations with standard deviations.
INPUT PROGRAMStart an input program: commands that build the cases of a new active dataset.
END INPUT PROGRAMEnd an input program and run it.
END CASEIn an input program: add the case built so far to the dataset and go on.
END FILEIn an input program or FILE TYPE: stop reading; the case being built is dropped.
REREADIn an input program: let the next DATA LIST read the last record again.
REPEATING DATAIn an input program or FILE TYPE: one case per repeating group of a record.
FILE TYPEStart the definition of a file with several kinds of records.
RECORD TYPEInside FILE TYPE: the record types the following DATA LIST reads.
END FILE TYPEEnd a FILE TYPE definition and read the file.
SPLIT FILERun each procedure once per run of consecutive cases that share the split values.
FILTERLeave out of procedures the cases whose filter value is 0 or missing.
TEMPORARYMake the changes that follow last only until the next procedure.
N OF CASESKeep only the first n cases from the next data pass on.
NShort for N OF CASES.
SAMPLEKeep a random sample of the cases.
BOOTSTRAPGive the next procedure bootstrap bias, standard errors and confidence intervals.

All commands