set_formula
Assign a formula to a STATISTICA variable and recompute it to inspect results; use attach=true to write changes into a running STATISTICA window.
Instructions
Assign a formula to a variable (STATISTICA keeps it in the variable long name) and recompute it, e.g. formula "=v9*v10". The result values are returned for inspection. Use attach=true to write into the running STATISTICA window.
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>",
"formula": "<formula>"
},
"name": "set_formula"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the source file. | |
| save | No | Optional destination .sta path. | |
| sheet | No | ||
| attach | No | Attach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed). | |
| formula | Yes | Formula without or with a leading "=", e.g. "v9*v10". | |
| variable | Yes | Target variable (name or 1-based index). | |
| recalculate | No | Recompute the variable after assignment. Default true. |