search for: aggarwalneha2000

Displaying 11 results from an estimated 11 matches for "aggarwalneha2000".

2018 May 02
0
using apply
Hi Neha, Perhaps merge() from base or join from dplyr is what you are looking for. data. table could also be interesting. Hth Ulrik On Wed, 2 May 2018, 21:28 Neha Aggarwal, <aggarwalneha2000 at gmail.com> wrote: > Hi > > I have 3 dataframes, a,b,c with 0/1 values...i have to check a condition > for dataframe a and b and then input the rows ids to datframe c . In the if > condition, I AND the 2 rows of from a and b and then see if the result is > equal to one of t...
2018 May 02
2
using apply
Hi I have 3 dataframes, a,b,c with 0/1 values...i have to check a condition for dataframe a and b and then input the rows ids to datframe c . In the if condition, I AND the 2 rows of from a and b and then see if the result is equal to one of them. I have done this using a for loop, however, it takes a long time to execute with larger dataset..Can you help me do it using apply function so that i
2018 Mar 20
2
Elements of Sets as dataframe column names
Hello all, I have a set B and a dataframe df. I want to name the columns of the dataframe after the elements of the set B. For example, for set B with elements {{"P1"}, {"P2"}, {"P3", "P4"}} I want to create a new dataframe with 3 columns named {"P1"} and {"P2"} and {"P3","P4"}. I tried colnames(df)<-(B). But it
2018 Apr 21
2
Check if row of dataframe is superset of any row in another dataframe.
Hi, I am looking for a way in which I can check if rows in 1 dataframe are present in another data frame in a unique way. A row in dataframe should be super set of any row in another dataframe. I can write a for loop for it, however, that will be inefficient. So, I am looking for an efficient way to do this in R. I have explained it with an example below: I want to check if a row in dataframe
2018 Mar 12
0
subsetting comparison problem
> On Mar 11, 2018, at 3:32 PM, Neha Aggarwal <aggarwalneha2000 at gmail.com> wrote: > > Hello All, > I am facing a unique problem and am unable to find any help in R help pages > or online. I will appreciate your help for the following problem: > I have 2 data-frames, samples below and there is an expected output > > R Dataframe1: &gt...
2018 May 24
1
Time complexity of functions in R
Hi, I have implemented an algorithm in R, where i have used while loop and some set operations inside it, for example, while(condition){ union(set A,set B) set C - set D intersection(set D, set E) } I want to calculate the complexity of my algo. Can you tell me the complexity of union, intersection and set minus operations/functions in R? Is it O(n) or O(log n) ? Also can anyone point a good
2018 Mar 11
4
subsetting comparison problem
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4...... CN R1 0 1 0 1 R2 1 0 1 1 R3
2018 Mar 12
0
Subsetting comparison problem
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4...... CN R1 0 1 0 1 R2 1 0 1 1 R3
2018 Mar 12
0
Dataframe Subsetting comparison
Hello All, I am facing a unique issue and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4...... CN R1 0 1 0 1 R2 1 0 1 1 R3
2018 Mar 18
1
How to take difference of sets when there is an empty subset involved
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)
2018 Mar 18
1
Set Difference Problem
Hello All, I am facing a problem and am unable to find much help online as sets package in R is relatively new. My problem is as follows: Set R is made of 2 sets x and y x<-{"P1", "P2", "P3", "P4"} y<-{} R<-set(x,y) #R={{}, {"P1", "P2", "P3", "P4"}} i need to use R in a recursive loop where i need to take