合并并保留R中的变量标签

时间:2016-05-08 04:41:33

标签: r dataframe

我正在尝试合并以大量变量为特征的不同数据框,这些变量以c302c303等代码命名。从SPSS导入的原始文件保持非常有用的标签。

当我尝试合并这些数据框时(使用cbindmerge),我丢失了所有变量标签。是否可以保留它们?

1 个答案:

答案 0 :(得分:0)

不使用<div class='tabs'> <h5>Tabs</h5> </div> <div class='content'> <h5>Here is some random text to make this scroll</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> <h5>This is the main content</h5> </div> <div class='slide-up'> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content</h5> <h5>Slide up content end</h5> </div>,而是使用dplyr的merge,因为它保留了属性:

left_join