[R] matching doesn't work
jen@r@@mu@ @end|ng |rom gm@||@com
Sat Apr 11 02:01:15 CEST 2020
On 2020-04-10 18:46 -0500, Ana Marija wrote:
> so if I understand correctly you would just remove sep=" " from my codes?
> Thank you so much for working on this.
> Is there is any chance you can change my original code (pasted bellow)
> with changes you think should work?
> # get PLINK output
> plink.genome <- read.table("plink.genome", header=TRUE)
> snpgdsBED2GDS("output4.bed", "output4.fam","output4.bim", "HapMap.gds")
> genofile <- snpgdsOpen("HapMap.gds")
> # get SNPRelate output
> ibd <- snpgdsIBDMoM(genofile, remove.monosnp=FALSE, kinship=TRUE)
> # adjust for the orders of sample pair
> pair.samp <- paste(ibdlist$ID1, ibdlist$ID2, sep=" ")
> plink.genome <- plink.genome[match(
> paste(plink.genome$IID1, plink.genome$IID2, sep=" "), pair.samp), ]
Yes, it seems like my tab separated values got converted to
spaces ... so comma separated values seemed like a sane choice
But ... I do not have all those specific files called here ...
this seems very similar to what you had before ... what is it
that does not work? Do you get any errors here at all, or?
More information about the R-help