Hello, Problem I am facing is as follows:
Set A is made of 2 sets x and y x<-{"P1", "P2", "P3", "P4"} y<-{} A<-set(x,y) #A={{}, {"P1", "P2", "P3", "P4"}} i need to use A in a recursive loop where i need to take set difference of A and it 's elements. Example: for (i in A){ print(i) A<-set_symdiff(i,A) ###Imp line i need help on print(A) } the program is unable to recognise the empty set in the set A. I tried various methods in Imp line above: > A-i #Output : {{}, {"P1", "P2", "P3", "P4"}} > set_symdiff(i,A) Output: {{}, {"P1", "P2", "P3", "P4"}} > set_symdiff(A,i) Output: {{}, {"P1", "P2", "P3", "P4"}} i also tried with set_complement() .But it does not subtract the empty subset from the bigger set. It seems it doesn't recognise it. What else can I try ? any pointers/ packages will be great help. . Thanks in advance, Neha [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.