Re: [R] how to calculate multiple meta p values

2019-10-31 Thread Ana Marija
Can you please get back to me about this, I need this meta p values for manuscript I have to submit next week On Wed, Oct 30, 2019 at 5:35 PM Ana Marija wrote: > > I also tried to do it this way: > > d$META <- sapply(seq_len(nrow(d)), function(rn) { >

Re: [R] how to calculate multiple meta p values

2019-10-30 Thread Ana Marija
I also tried to do it this way: d$META <- sapply(seq_len(nrow(d)), function(rn) { unlist(sumz(as.matrix(d[,.(LCL,Retina)])[rn,], weights = as.vector(d[,.(wl,wr)])[rn,], na.action=na.fail)["p"]) }) but again I am getting error: Error in sumz(as.matrix(d[, .(LCL, Retina)])[rn, ],

Re: [R] how to calculate multiple meta p values

2019-10-30 Thread Ana Marija
Hi Michael, this still doesn't work, by data frame has a few less columns now, but the principle is still the same: > head(d) chrpos gene_id LCL Retina wl wr 1: chr1 775930 ENSG0237094 0.3559520 9.72251e-05 31.62278 21.2838 2: chr1 815963

Re: [R] how to calculate multiple meta p values

2019-10-30 Thread Michael Dewey
Dear Ana Yes, when apply coerces q to a matrix it does so as a character matrix because of the values in the first column. So you need to wrap the references to x in helper in as.numeric() tat is to day like as.numeric(x[2:4]) and similarly for the other one. Sorry about that, I should have

Re: [R] how to calculate multiple meta p values

2019-10-28 Thread Ana Marija
Hi Michael, I tried what you proposed with my data frame q: > head(q) IDP G E wb wg we 1: rs1029830 0.0979931 0.0054060 0.39160 580.6436 40.6325 35.39774 2: rs1029832 0.1501820 0.0028140 0.39320 580.6436 40.6325 35.39774

Re: [R] how to calculate multiple meta p values

2019-10-27 Thread Michael Dewey
Dear Ana There must be several ways of doing this but see below for an idea with comments in-line. On 26/10/2019 00:31, Ana Marija wrote: Hello, I would like to use this package metap to calculate multiple o values I have my data frame with 3 p values head(tt) RSG

Re: [R] how to calculate multiple meta p values

2019-10-25 Thread Ana Marija
this is the function I was referring to: https://www.rdocumentation.org/packages/metap/versions/1.1/topics/sumz On Fri, Oct 25, 2019 at 6:31 PM Ana Marija wrote: > > Hello, > > I would like to use this package metap > to calculate multiple o values > > I have my data frame with 3 p values > >

[R] how to calculate multiple meta p values

2019-10-25 Thread Ana Marija
Hello, I would like to use this package metap to calculate multiple o values I have my data frame with 3 p values > head(tt) RSG E B 1: rs2089177 0.9986 0.7153 0.604716 2: rs4360974 0.9738 0.7838 0.430228 3: rs6502526 0.9744 0.7839