recode
Map old values to new values for a chosen variable in a STATISTICA data file, route unlisted values to a default, and keep or replace missing values.
Instructions
Recode the values of one variable using a mapping (old value -> new value), optionally sending every unlisted value to default. Missing values are preserved unless missing is given.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"variable": "<variable>",
"map": "<map>"
},
"name": "recode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map | Yes | Mapping old value -> new value (keys are compared as strings). | |
| path | Yes | Absolute path to the source file. | |
| save | No | Optional destination path to persist the result as .sta. | |
| sheet | No | ||
| attach | No | Attach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed). | |
| default | No | Value assigned to every unlisted, non-missing cell. | |
| missing | No | Replacement for missing cells (default: leave missing). | |
| variable | Yes | Variable to recode. |