Combine table or timetable variables into multicolumn variable
T2 = mergevars(
combines the table variables specified by T1
,vars
)vars
to create one
multicolumn variable in T2
(see diagram). All other variables
from T1
are unaltered. You can specify variables by name, by
position, or using logical indices.
By default, the name of the merged variable in T2
takes the
form Var
, where
N
is the position of the
merged variable. For example, if the merged variable is the third variable in
N
T2
, then its name is Var3
.
To split multicolumn variables, use the splitvars
function.
T2 = mergevars(___,'MergeAsTable',true)
merges
the specified variables into a table, instead of an array. The new table is itself a
variable of the output table T2
. Use this syntax to combine
variables that cannot be concatenated into an array. You can use this syntax with
any of the input arguments from the previous syntaxes.
addvars
| movevars
| removevars
| renamevars
| splitvars