将数据帧分成两个-R

时间:2017-10-20 10:25:59

标签: r dataframe

我有一个数据帧,包含两个我在不知不觉中合并的数据帧(x,y)。我如何分开它们?

当我尝试分割时,我得到错误:无法分配大小为207.6 Mb的向量

  <div class="container">
    <div class="row">

        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 ">
          <img src="images/1thumb.png" alt="Main">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 ">
          <img src="images/2thumb.jpg" alt="Elevator1">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 ">
          <img src="images/3thumb.jpg" alt="Elevator2">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 ">
          <img src="images/4thumb.jpg" alt="Elevator3">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 ">
          <img src="images/5thumb.jpg" alt="Interior">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-6 ">
          <img src="images/6thumb.jpg" alt="Reception">
        </div>

    </div>
  </div>

1 个答案:

答案 0 :(得分:0)

我明白了。我使用了列的索引,我想要前80列。像这样:

z <- df[,1:80]