Commit cfd1eba6 authored by Archana Bidargaddi's avatar Archana Bidargaddi
Browse files

added documentation for replace command.

parent 41e2c220
......@@ -99,8 +99,8 @@ function CommandExecutor() {
},
"generate": {
"parameters": "newvar = expression [if ...]",
"shortDescription": "Creates new variable as per the expression defined. CURRENTLY NOT SUPPORTED",
"description": "The command generate creates a new variable where its values are as per the expression defined.\n\nThe type of new variable will be determined by the result returned by the expression.\nThe arithmetic functions supported are +, - , *, / and ^ . \n\nCURRENTLY NOT SUPPORTED",
"shortDescription": "Creates new variable as per the expression defined.",
"description": "The command generate creates a new variable where its values are as per the expression defined.\n\nThe type of new variable will be determined by the result returned by the expression.\nThe arithmetic functions supported are +, - , *, / and ^ .",
"syntax": "generate newvar =exp [if ...]",
"examples": [
{
......@@ -214,6 +214,22 @@ function CommandExecutor() {
}
]
},
"replace": {
"parameters": "oldvar = expression [if ...]",
"shortDescription": "Modifies existing variable as per the expression defined.",
"description": "The command replace overwrites the existing variable where its values are as per the expression defined.\n\nThe type of new variable will be determined by the result returned by the expression.\nThe arithmetic functions supported are +, - , *, / and ^ .",
"syntax": "replace oldvar =exp [if ...]",
"examples": [
{
"example": "replace fakeVar = age + 5",
"description": "Modify the variable called \"fakeVar\". The value for each case will be the value of variable age plus five."
},
{
"example": "replace fakeVar = age + 5 if gender = 0",
"description": "As above, but only when gender is equal to zero. Value of fakeVar will otherwise be missing"
}
]
},
"summarize": {
"parameters": "varlist [if]",
"shortDescription": "List summary statistics for variables.",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment