Displaying 2 results from an estimated 2 matches for "dsn2".
Did you mean:
dsn
2006 Sep 11
2
faster way?
Hi,
Is there a faster way to do this? It takes forever, even on a
moderately sized dataset.
n <- dim(dsn)[1]
dsn2 <- dsn[order(-dsn$xhat),]
dsn2[1, "cumx"] <- dsn2[1, "xhat"]
for (i in 2:n) {
dsn2[i, "cumx"] <- dsn2[i - 1, "cumx"] + dsn2[i, "xhat"]
}
[[alternative HTML version deleted]]
2006 Jun 09
1
Saving dns2.plot as a jpg image
...rsion of the code I have tried:
x <- seq(0,200,length=200)
y <- seq(0, 35, length=200)
jpeg(filename = "C:/fig1.jpg", width = 5, height = 4,pointsize = 12, quality
= 100, bg = "white", res = NA)
par(mfrow=c(1,2),plt=c(.15,.99,.15,.95),mgp=c(1.5,1,0),tcl=-.25,cex.axis=.8)
dsn2.plot
(x,y,xi=c(29,6),Omega=matrix(c(2580,458,458,84),2),alpha=c(5482940,-2120750))
dst2.plot(x,y, xi=c(29,6),Omega=matrix(c(2065,380,380,72),2),alpha
=c(48,-13),df=10)
dev.off()
I've also tried using graphics.off().
Any help would be greatly appreciated?
Thanks,
Martin Heller
[[alternative H...