I have two fairly long lists (both are 232,000 lines). When I try to perform an analysis using both parameters, R gives me an error that some elements in one list are not in the other (to run certain code, both lists must be exactly the same). I did the following to try to decrypt this:
both <- varss %in% varsg
length(both)
int <- intersect(varss,varsg)
length(int)
difs <- setdiff(varss,varsg)
length(difs)
difg <- setdiff(varsg,varss)
length(difg)
I think I have the correct code, but my problem is that the results from the above code do not bring what I need. For example, for both <- varss %in% varsgI get only one FALSE. Do both of my lists have to be in a specific class for this to work? I tried data.frame, listand character. Not sure if something important needs to be used, for example function.
, SNP ( )
Edit:
readRDS() , . varss[1:10,] :
[1] rs41531144 rs41323649 exm2263307 rs41528348 exm2216184 rs3901846
[7] exm2216185 exm2216186 exm2216191 exm2216198
232334 Levels: exm1000006 exm1000025 exm1000032 exm1000038 ... rs9990343
RData , , ...
varsg[1:10,]:
[1] exm2268640 exm41 exm1916089 exm44 exm46 exm47
[7] exm51 exm53 exm55 exm56
232334 Levels: exm1000006 exm1000025 exm1000032 exm1000038 ... rs999943