You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new data set while the `args` aggregations has been applied on passed columns. The `args` argument must be in the form of `cols=>fun=>newname`, where `cols` refers to columns in the passed data set. `fun` assumes a single column as its input, thus, multiple columns will be broadcasted, i.e. `cols=>fun` will be tranlated as `col1=>fun`, `col2=>fun`, ..., and `col=>funs` will be translated as `col=>fun1`, `col=>fun2`, .... The `byrow` function can be passed as `fun`, however, its input must be referring to columns which already an operation has been done on them.
529
+
530
+
For using a multivate function the columns must be passed as tuple of column names or column indices.
531
+
532
+
For grouped data set the operations are done on each group of observations.
Modify columns of a data set. The `args` arguments must be in the form of `cols => fun => newnames`. The `fun` function will be called on passed `cols`, with the excpetion of two special functions: `byrow` and `splitter`. `fun` assumes a single column as its input, thus passing multiple columns will be broadcasted, i.e. `cols => fun` will be translated to `col1=>fun`, `col2=>fun`, .... When `newname` is not provided `modify!` modifies the passed column.
299
+
300
+
When a grouped data set is passed to `modify!`, the operation is done on each group of observations.
301
+
302
+
each `args` can be constructed based on columns in the original data set or the columns which have been created before it.
303
+
304
+
# Special functions
305
+
306
+
`byrow` and `splitter` are two special functions which can be passed as `fun`.
307
+
308
+
`byrow` can accept multiple columns as input and does a given operation on each row of the data set. When a single column is passed to `byrow`, `modify!` modifies the passed column, however, when multiple columns are passed, `byrow` applies the row-wise operation on them and creates a new column.
309
+
310
+
`splitter` splits a column of tuples to multiple columns. When `splitter` is set as `fun` the `newnames` must be given.
311
+
312
+
# Using multivariate functions
313
+
314
+
To pass multiple columns to a `fun` function which operates on multiple inputs, the columns must be passed as tuple of column names, or column indices.
0 commit comments