select() set position

后端 未结 2 982
南笙
南笙 2021-01-27 23:41

If I have df like this

df <- read.table(text=\"
              id date       paid_at    binded_at  
1            107 2016-12-16 2017-06-02 2017-06-07
2                 


        
2条回答
  •  醉梦人生
    2021-01-27 23:49

    df %>% 
      select(id, paid_at, everything())
    

    You can just select id and paid_at, and then add everything() to select all other columns as well in their original order.

提交回复
热议问题