Read about the all.x and all.y arguments to ?merge.
On April 21, 2020 7:53:33 AM PDT, Ana Marija
wrote:
>Hello,
>
>> head(a)
> ID_1 pheno
>1 0 B
>2 fam1000_G1000 0
>3 fam1001_G1001 0
>4 fam1003_G1003 1
>5 fam1005_G1005 0
>6 fam1009_G1009 0
>> head(b)
this solved it:
m=merge(a,b,by="ID_1",all.y = T)
On Tue, Apr 21, 2020 at 9:53 AM Ana Marija wrote:
>
> Hello,
>
> > head(a)
>ID_1 pheno
> 1 0 B
> 2 fam1000_G1000 0
> 3 fam1001_G1001 0
> 4 fam1003_G1003 1
> 5 fam1005_G1005 0
> 6 fam1009_G1009 0
> >
Dear Albert,
Here is one way:
tmp.scores <- readLines("~/scores.txt")
tmp.seq <- readLines("~/seq.txt")
tmp.seq <- strsplit(gsub("N", "", tmp.seq), "")[[1]]
genedat <- data.frame(Sequence = tmp.seq, Scores = as.numeric(tmp.scores))
## Yields
> genedat
Sequence Scores
1 A 0.80
2
3 matches
Mail list logo