Behavior of <- NULL on lists versus data.frames for removing data
- by Ananda Mahto
Many R users eventually figure out lots of ways to remove elements from their data. One way is to use NULL, particularly when you want to do something like drop a column from a data.frame or drop an element from a list.
Eventually, a user comes across a situation where they want to drop several columns from a data.frame at once, and they hit upon…