【发布时间】:2018-05-22 15:33:47
【问题描述】:
我有一个这样的data.table:
Model Variable Coefficient standardized coefficient Model Variable Coefficient standardized coefficient Model
1: 0 Intercept 7.136994e+12 0.919481694 0.1 Intercept 2.201799e+12 0.918641093 0.2
2: 0 Comp_BK_Tot_Tot050500_i -1.177355e+13 -0.005086289 0.1 Comp_BK_Tot_Tot050500_i -3.632202e+12 -0.001569146 0.2
Variable Coefficient standardized coefficient Model Variable Coefficient standardized coefficient
1: Intercept 2.244410e+12 0.918648351 0.3 Intercept 2.258975e+12 0.918650832
2: Comp_BK_Tot_Tot050500_i -3.702495e+12 -0.001599514 0.3 Comp_BK_Tot_Tot050500_i -3.726523e+12 -0.001609894
这是我的问题,我有一个变量保存为“0.3”为new_num。如果列名“Model”包含= new_num,我该如何编写和表达,然后选择该列及其右侧的下3列?
例如,在这种情况下,我希望我的输出是:
Model Variable Coefficient standardized coefficient
0.3 Intercept 2.258975e+12 0.918650832
0.3 Comp_BK_Tot_Tot050500_i -3.726523e+12 -0.001609894
【问题讨论】: