Shifting non-NA cells to the left

前端 未结 5 492
走了就别回头了
走了就别回头了 2020-11-27 21:17

There are many NA\'s in my dataset and I need to shift all those cells (at row level) to the left.

Example- my dataframe:

    df=data.frame(x=c(\"         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 21:41

    If you don't want to use VBA, you can try the following steps.

    1. Select your dataset
    2. Replace NA will empty cells
    3. press F5 and select blanks ok
    4. right click on any of the selection and delete (left)
    

    I hope this helps.

提交回复
热议问题