I have a list of lists like:
List_PatientState
[[1]]
BirthYear Hispanic tEye tStatus tKidney
12604 2 0 1 2 2
[[2]]
BirthYear Hispanic tEye tStatus tKidney
9252 2 0 2 1 1
[[3]]
BirthYear Hispanic tEye tStatus tKidney
6613 2 0 1 1 1
[[4]]
BirthYear Hispanic tEye tStatus tKidney
6265 2 0 2 2 1
[[5]]
BirthYear Hispanic tEye tStatus tKidney
6202 2 0 1 1 2
in a loop I create a new list and I would like to neglect the list if it is available in my current list of list
for more information, consider this list that is created in my loop:
[[6]]
BirthYear Hispanic tEye tStatus tKidney
11773 2 0 1 1 1
This is similar to:
List_PatientState[[3]]
I would like to detect such lists ,in my list of lists,So, I could reject it to add in my current list of lists. Is there anybody to help me. I would be much appreciated. the output of dput(List_PatientState):
> dput(List_PatientState)
list(structure(list(BirthYear = structure(2L, .Label = c("1",
"2", "3"), class = "factor"), Hispanic = structure(1L, .Label = c("0",
"1"), class = "factor"), tEye = structure(1L, .Label = c("1",
"2"), class = "factor"), tStatus = structure(2L, .Label = c("1",
"2"), class = "factor"), tKidney = structure(2L, .Label = c("1",
"2"), class = "factor")), .Names = c("BirthYear", "Hispanic",
"tEye", "tStatus", "tKidney"), row.names = 12604L, class = "data.frame"),
structure(list(BirthYear = structure(2L, .Label = c("1",
"2", "3"), class = "factor"), Hispanic = structure(1L, .Label = c("0",
"1"), class = "factor"), tEye = structure(2L, .Label = c("1",
"2"), class = "factor"), tStatus = structure(1L, .Label = c("1",
"2"), class = "factor"), tKidney = structure(1L, .Label = c("1",
"2"), class = "factor")), .Names = c("BirthYear", "Hispanic",
"tEye", "tStatus", "tKidney"), row.names = 9252L, class = "data.frame"))