I have a list lst1
and a dataframe from another list lst2[[df]]
.
If I want to append df
to lst1
with the condition !is.null(lst2[[df]]), what should I do?
I would like to know the way if I use lapply
as well as append
For append
, I think we can do append(lst1, list(lst2[[df]])
. I am not sure where to add condition. I also have the doubt on list(lst2[[df]])
part. Could anyone guide me on this?
Thanks.