search for: rowsds

Displaying 7 results from an estimated 7 matches for "rowsds".

2013 May 11
1
How to repeat 2 functions in succession for 400 times? (microarray data)
...be this helps: ?set.seed(24) ?mydata4<- as.data.frame(matrix(sample(1:100,10*38,replace=TRUE),ncol=38)) ?dim(mydata4) #[1] 10 38 ?library(matrixStats) res<-do.call(cbind,lapply(1:400, function(i) {permutation<-sample(mydata4); (rowMeans(permutation[,1:27])-rowMeans(permutation[,28:38]))/(rowSds(permutation[,1:27])+rowSds(permutation[,28:38]))} )) ?dim(res) #[1]? 10 400 A.K. >I want to do permutation test and then get a PGC score 400 times on mydata4 (microarray data) > >I use 2 functions as below: >1. permutation<-sample(mydata4) >2. PGC <- (rowMeans(permutation...
2008 Oct 15
3
Standard deviation for rows
Hi everyone, I have just started using R, and I have a simple question. How can I get the Standard deviation for rows. basically I am looking for something like "rowMeans()" but for Standard deviation (I tried "rowSds()" didn't exist) Thanks, -- View this message in context: http://www.nabble.com/Standard-deviation-for-rows-tp19998106p19998106.html Sent from the R help mailing list archive at Nabble.com.
2014 Dec 06
1
R CMD check --as-cran and (a)spell checking
...matrixStats/DESCRIPTION' ... OK * this is package 'matrixStats' version '0.12.0' * checking CRAN incoming feasibility ... NOTE Maintainer: 'Henrik Bengtsson <henrikb at braju.com>' Possibly mis-spelled words in DESCRIPTION: rowMedians (18:74) rowRanks (18:92) rowSds (18:111) * checking package namespace information ... OK ... Thanks Henrik
2008 Oct 17
2
function help
...each row in each sample. Sample=function(name, n){ res=replicate(n,name[,sample(colnames(name),n)],simplify=FALSE) Means=do.call(rbind,lapply(res,function(x) rowMeans(x))) rownames(Means)=paste('sample',1:n,sep="") Gmean=colMeans(Means) STDs=do.call(rbind,lapply(res,function(x) rowSds(x))) rownames(STDs)=paste('sample',1:5,sep="") Gsd=sd(STDs) return(Gmean,Gsd)} I then need to use the mean and standard deviation from each row to calculate the Power for 2 sample means. here is the function I use to do it: Power=function(alfa,m1,m2,s1,s2,n1,n2){ up=abs(m1-m2)...
2008 Oct 22
2
Help with functions
...ple(colnames(trans),nPatient)],simplify=FALSE) show(result) Means=do.call(rbind,lapply(result,function(x) rowMeans(x))) rownames(Means)=paste('sample',1:nSample,sep="") show(Means) Gmean=colMeans(Means) Gmean # load genefilter package STDs=do.call(rbind,lapply(result,function(x) rowSds(x))) rownames(STDs)=paste('sample',1:nSample,sep="") show(STDs) Gsd=sd(STDs) Gsd return(Gmean,Gsd)} -- View this message in context: http://www.nabble.com/Help-with-functions-tp20113920p20113920.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 08
1
heatmap.2: question regarding the "raw z-score"
Hi, I am analysing gene expression data using the heatmap.2 function in R and I was wondering what is the formula of the "raw z-score" bar which shows the colors for each pixel. According to that post: https://mailman.stat.ethz.ch/pipermail/r-help/2006-September/113598.html, it is the (actual value - mean of the group) / standard deviation. But, mean of which group? Mean of the gene
2009 Jul 09
2
How to Populate List
...ou could give me some more > details about it or even if there is a book/manual that I could address > to.. How about looking at the code?      if (scale == "row") {          retval$rowMeans <- rm <- rowMeans(x, na.rm = na.rm)          x <- sweep(x, 1, rm)          retval$rowSDs <- sx <- apply(x, 1, sd, na.rm = na.rm)          x <- sweep(x, 1, sx, "/")      }      else if (scale == "column") {          retval$colMeans <- rm <- colMeans(x, na.rm = na.rm)          x <- sweep(x, 2, rm)          retval$colSDs <- sx <- apply(x, 2, sd,...