How to delete a row by reference in data.table?

前端 未结 6 914
南方客
南方客 2020-11-22 16:07

My question is related to assignment by reference versus copying in data.table. I want to know if one can delete rows by reference, similar to

         


        
6条回答
  •  难免孤独
    2020-11-22 16:53

    Instead or trying to set to NULL, try setting to NA (matching the NA-type for the first column)

    set(DT,1:2, 1:3 ,NA_character_)
    

提交回复
热议问题