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

GET

Read a data file and make it the active dataset.

Syntax

GET FILE='path' | handle [/KEEP=varlist] [/DROP=varlist] [/RENAME=(old = new) ...] [/MAP].

KEEP, DROP and RENAME work in the order written, as in ADD FILES. MAP lists the variables as the options before it leave them, each with its name in the file; it may come as often as you like.

Example

GET FILE='survey.sav'.
GET FILE='survey.sav' /KEEP=id region satisfaction spend.
GET FILE='survey.sav' /DROP=ch_web TO ch_email /RENAME=(spend = monthly_bill) /MAP.

The example reads the sample data file survey.sav, an invented customer survey; save it in the folder you run the syntax from.

Example output

Variables in the active dataset

VariableName in the file
idid
regionregion
gendergender
ageage
age_groupage_group
educationeducation
weightweight
satisfactionsatisfaction
recommendrecommend
contactedcontacted
switchingswitching
monthly_billspend
interview_dateinterview_date

statscraft help GET prints the same text in the terminal. All commands