Displaying 6 results from an estimated 6 matches for "colstdevs".
Did you mean:
coastdev
2002 Aug 14
3
t-test via matrix operations
I need to calculate a large number of t statistics, and would like to do so via matrix operations. So far I have figured out a way to calculate the mean of each row of the matrix:
d <- matrix(runif(100000,1,10), 1000, 10) # some test data
s <- rep(1,ncol(d)) # a sum vector to use for matrix multiplication
means <- (d%*%s)/ncol(d)
This is at least 1 order of magnitude faster than
2002 Jan 07
0
New package: colSums
I've uploaded a package colSums_1.0.tar.gz to CRAN /src/contrib/Devel. It
contains functions colSums, colMeans, colVars, colStdevs, rowSums, rowMeans,
rowVars, and rowStdevs. These do simple, fast arithmetic on columns/rows of a
matrix, or more generally across dimensions of an array, e.g. colSums(m) =
apply(m, 2, sum) but faster. They should be compatible with the corresponding
S-Plus functions.
The core code was written b...
2004 Jun 09
1
Re: R equivalent of Splus rowVars function
...ms(x^2, na.rm, dims))
N <- rowSums(!is.na(x), FALSE, dims)
Nm1 <- if (unbiased) N-1 else N
if (twopass) {x <- if (dims==0) x - mean(x, na.rm=na.rm) else
sweep(x, 1:dims, rowMeans(x,na.rm,dims))}
(rowSums(x^2, na.rm, dims) - rowSums(x, na.rm, dims)^2/N) / Nm1
}
colStdevs <- function(x, ...) sqrt(colVars(x, ...))
rowStdevs <- function(x, ...) sqrt(rowVars(x, ...))
2006 May 17
0
script S-plus -> R
...2,tdon21)
don<-guiDisplayFileDialog()
import.data (DataFrame="tdon",FileName=don,FileType="EXCEL")
nbcol<-length(tdon[1,])
nlc<-matrix(0,1,nbcol)
for (i in 1:nbcol)
{nbl1<-tdon[,i]
nbl2<-nbl1[nbl1!="NA"]
nbl3<-numRows(nbl2)
nlc[,i]<-nbl3
ect<-colStdevs(tdon,na.rm=T,unbiased=T)
h<-1.06*ect*(nlc^-0.2)
cpt<-0
nlgn<-choose(nbcol,2)
Results<-matrix("*",nrow=nlgn,ncol=3,dimnames=list(NULL,c("Ech.1","Ech.2","Overlap")))
for (i in 1:(nbcol-1))
{tdon1<-tdon[,i]
tdon11<-tdon1[tdon1!="NA"]...
2002 Nov 15
2
Why no colSDs etc
Hi people,
If there is a fn "colMeans" why isn't there a "colSDs" etc
Thanks,
Phil.
--
Philip Rhoades
Pricom Pty Limited (ACN 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
Mobile: +61:0411-185-652
Fax: +61:2:8923-5363
E-mail: pri at chu.com.au
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2012 Apr 19
4
Column(row)wise minimum and maximum
Hi,
Currently, the "base" has colSums, colMeans. It seems that it would be useful to extend this to also include colMin, colMax (of course, rowMin and rowMax, as well) in order to facilitate faster computations for large vectors (compared to using apply). Has this been considered before? Please forgive me if this has already been discussed before.
Thanks,
Ravi
Ravi Varadhan, Ph.D.