Is spectra.wavelength a factor? If so, plot will treat it as
categorical and not draw a line. Try the following modification.
plot(as.numeric(spectra.wavelength), cormat, type = "l", ylim=c(-1,1),
xlab="Wavelength (nm)", ylab="Correlation")
Quoting MikSmith :
Hi
I'm trying to write a ge
One simple adjustment is the following:
apply(matrix(x[rows,],nr=length(rows)),2,mean)
Quoting Peter Kharchenko :
Dear fellow R users,
I can't figure out how to do a simple thing properly: apply an
operation to matrix columns on a selected subset of rows. Things go
wrong when only one row is
JC,
If each row are the counts for a 2 x 2 contingency table - so for the
ith contingency table you have counts for row 1 c(Y08[i],Z08[i]) and
row 2 (Y09[i],Z09[i]) then you could use apply:
X <- cbind(vdata$Y08,vdata$X08-vdata$Y08,vdata$Y09,vdata$X09-vdata$Y98)
f.chisq <- function(x){
m <
3 matches
Mail list logo