Displaying 4 results from an estimated 4 matches for "ans3".
Did you mean:
ans
2010 Dec 15
3
Applying function to a TABLE and also "apply, tapply, sapply etc"
... 11
I need to run the function 'fun' for each pair of values taken by variable_1 and variable_2 separately. Also, the results (= 30, 70 and 14) obtained for each of above pairs should be stored in different csv files, say "ans1.csv", "ans2.csv" and "ans3.csv" respectively which I can use for further analysis. (In reality each of these output files will consists of 1000 records).
As I had mentioned in my earlier mail, I am new to R and I think I
should be using apply or sapply or tapply etc., which I have tried but I am not able to proceed fu...
2010 Feb 12
1
paired wilcox test on each row of a large dataframe
hI
I have to calculate V statistic for each row of a large dataframe (28000). I
can not use multtest package for paired wilcox test. I have been using for
loop which are. Is there a way to speed the computation with another method
like using apply or tapply?
My data set looks like this:
11573_MB 11911_MB 11966_MB 12091_MB 12168_MB
12420_MB................
cg00000292
2007 Feb 08
2
Timings of function execution in R [was Re: R in Industry]
On 2/8/07, Albrecht, Dr. Stefan (AZ Private Equity Partner)
<stefan.albrecht at apep.com> wrote:
> Dear all,
>
> Thanks a lot for your comments.
>
> I very well agree with you that writing efficient code is about optimisation. The most important rules I know would be:
> - vectorization
> - pre-definition of vectors, etc.
> - use matrix instead of data.frame
> - do
2012 Sep 02
0
most efficient plyr solution
...3 <- function() {
tmp.list <- as.data.frame(rbind(as.numeric(Ax), as.numeric(Ay), as.numeric(Bx), as.numeric(By)))
# determine fisher.test p-values as list
res3 <- mclapply(tmp.list,
function(x) { fisher.test( matrix(unlist(x), ncol=2), conf.int=F)$p.value },
mc.cores=4)
ans3 <- matrix(unlist(res3),ncol=4)
}
s3 <- sol3()
### solution 4 using plyr::maply
# difficulty finding equivalent code
# benefit could be: no input transform, no output transform, parallelization, and progress update
library(plyr)
library(abind)
library(doMC)
registerDoMC(cores=4)
sol4 <...