将不等长的列表转换为不带NA的数据帧

时间:2019-10-15 18:55:12

标签: r dataframe merge

我正在尝试将一组列表转换为数据框,但是这些列表的长度不同。如何将列表合并到一个数据框中?

str(MCP_reshape)
List of 10
 $ B lineage              : Factor w/ 111 levels "ACVRL1","ADAP2",..: 4 10 14 20 33 49 59 76 81
 $ CD8 T cells            : Factor w/ 111 levels "ACVRL1","ADAP2",..: 22
 $ Cytotoxic lymphocytes  : Factor w/ 111 levels "ACVRL1","ADAP2",..: 21 44 50 53 67 68 69
 $ Endothelial cells      : Factor w/ 111 levels "ACVRL1","ADAP2",..: 1 3 5 6 7 23 27 38 41 42 ...
 $ Fibroblasts            : Factor w/ 111 levels "ACVRL1","ADAP2",..: 29 30 31 32 40 54 80 98
 $ Monocytic lineage      : Factor w/ 111 levels "ACVRL1","ADAP2",..: 2 34 52 70 85 89 101
 $ Myeloid dendritic cells: Factor w/ 111 levels "ACVRL1","ADAP2",..: 11 12 13 26 28 111
 $ Neutrophils            : Factor w/ 111 levels "ACVRL1","ADAP2",..: 8 24 36 37 39 48 55 60 72 96 ...
 $ NK cells               : Factor w/ 111 levels "ACVRL1","ADAP2",..: 9 62 63 64 65 66 78 87 92
 $ T cells                : Factor w/ 111 levels "ACVRL1","ADAP2",..: 15 16 17 18 19 25 35 51 58 71 ...```

0 个答案:

没有答案