How can I convert tables to array, given that these tables contain variables with similar variable names?
10 ビュー (過去 30 日間)
I have tables that contain variables (columns) with the same names across all variables in these tables: VarName1, VarName2, ... VarName(N)
When I try to add these tables to a single array table (using "table2array" or "horzcat") I get this error message: "Duplicate variable name: 'VarName1' ".
How can I use this function to combine these tables into a single array without having to change all the variable names?
I couldn't find a clear answer.
回答 (1 件)
jonas 2018 年 12 月 6 日
It is unclear if you want to output an array or a table, but the nature of the error message suggests that you're trying to combine multiple tables into one, in which case you can use:
This relabels the column names to avoid duplicates.