Re: [R] How to take difference of sets when there is an empty subset involved

2018-03-18 Thread Duncan Murdoch
On 18/03/2018 11:00 AM, Neha Aggarwal wrote: Hello, Problem I am facing is as follows: Set A is made of 2 sets x and y x<-{"P1", "P2", "P3", "P4"} y<-{} Those aren't R code. I think you meant x <- set("P1", "P2", "P3", "P4") y <- set() A<-set(x,y) #A={{}, {"P1", "P2", "P3", "P4"}} i need

[R] How to take difference of sets when there is an empty subset involved

2018-03-18 Thread Neha Aggarwal
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<-se