tableAppend - Easily append selected variables to table

バージョン 1.0.0.0 (1.41 KB) 作成者: Germán
Merge tables with mismatching number of variables and fill missing variables with NaN
ダウンロード: 304
更新 2014/4/2

ライセンスの表示

It usually happens that you want to add rows to a table but you only have part of the original variables. There is currently no way to do this without having to create a table row with the complete list of variables.
tableAppend will concatenate the variables that are present in the original table, and will pad with NaN or 'NA' the missing variables.

Example:

tbl1:

var 1var2 var3
---- ---- ----
'a' 45 6
'b' 14 3
'c' 56 5

tbl2:

var3
----
8
2

tbl3 = tableAppend(tbl1, tbl2);

tbl3:

var1 var2 var3
---- ---- ----
'a' 45 6
'b' 14 3
'c' 56 5
'NA' NaN 8
'NA' NaN 2

引用

Germán (2024). tableAppend - Easily append selected variables to table (https://www.mathworks.com/matlabcentral/fileexchange/46121-tableappend-easily-append-selected-variables-to-table), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2014a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersTables についてさらに検索
タグ タグを追加

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0