Open alexsanjoseph opened 7 years ago
When I try to remove the last element of a list, I expect rlist to return an empty list list(). However, it errors out. Is this by design?
list()
list("a" = c(1,2,3)) %>% rlist::list.remove("a") Error in apply(m, 1L, any) : dim(X) must have a positive length
list("a" = c(1,2,3)) %>% rlist::list.remove("a")
Error in apply(m, 1L, any) : dim(X) must have a positive length
Also removing a non-existent element from a length-1 list also causes an error:
list(a=1,b=2) %>>% list.remove("c") # works! (returns input list) list(a=1) %>>% list.remove("c") # throws an error! :^(
When I try to remove the last element of a list, I expect rlist to return an empty list
list()
. However, it errors out. Is this by design?list("a" = c(1,2,3)) %>% rlist::list.remove("a")
Error in apply(m, 1L, any) : dim(X) must have a positive length