Displaying 9 results from an estimated 9 matches for "amvds".
Did you mean:
amds
2009 Aug 18
4
Lattice in a loop does not produce output
I cannot understand why xyplot does not work within a simple for loop.
This works up to the for loop; inside the for loop the png files are
opened and closed, but nothing is plotted. No error messages are written
to the console either. This is the case on both Windows and Linux.
By the way, running the script below on Linux using source() does not
even produce the first xyplot. This is less of
2009 May 22
2
Returning only a file path on Windows
I am choosing a file like this:
#Bring up file selection box
fn<-file.choose()
fp<-file.path(fn,fsep='\\')
Unfortunately, the file path contains the short file name and extension as
well. I had hoped to get only the path so I could make my own long
filenames (for output graphs) by concatenation with this file path.
Of course I can split the string and assemble the components from
2009 Apr 28
2
Dropping 'empty' panels from lattice
I have 8 cofactors possibly affecting one and only one variable.
I make conditional histograms:
<-pdf(file="tst3.pdf",paper="special",width=36,height=36)
<-histogram(~Oversized|dat$c1*dat$c2*dat$c5*dat$c6*dat$c7*dat$c8*dat$c9*dat$c10,nint=21,layout=c(32,8),data=dat,type="count")
<-dev.off()
This works (compliments to R developers!) but it does generate a
2009 Aug 11
3
Lattice: How to do error bars
I am trying to add 2 stdev error bars to lattice type plots:
panel.ebar<-function(x,y,dy=NULL,...) {
panel.xyplot(x,y,...)
panel.segments(x,y-dy,x,y+dy,...)
}
Then:
xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar)
This adds error bars but they are not conditioned on the factor fc.
xyplot(y+I(y-dy)+I(y+dy)~x|fc,data=dat)
This produces 3 series of points in different colors, conditioned
2009 May 27
1
Constrained fits: y~a+b*x-c*x^2, with a,b,c >=0
I wonder whether R has methods for constrained fitting of linear models.
I am trying fm<-lm(y~x+I(x^2), data=dat) which most of the time gives
indeed the coefficients of an inverted parabola. I know in advance that
it has to be an inverted parabola with the maximum constrained to
positive (or zero) values of x.
The help pages for lm do not contain any info on constrained fitting.
Does anyone
2009 Apr 08
3
Convert data frame containing time stamps to time series
I read records using scan:
dat<-data.frame(scan(file="KDA.csv",what=list(t="%m/%d/%y
%H:%M",f=0,p=0,d=0,o=0,s=0,a=0,l=0,c=0),skip=2,sep=",",nmax=np,flush=TRUE,na.strings=c("I/OTimeout","ArcOff-line")))
which results in:
> dat[1:5,]
t f p d o s a l c
1 1/21/09 5:01 16151 8.2 76 30 282 1060 53 7
2 1/21/09 5:02
2009 Jul 19
1
transform(_data,...) using strptime gives an error
I have timstamped data like this:
> sd[1:10,]
Tstamp Density Mesh50 Mesh70 Mesh100 Mesh150 Mesh200
2 2009/02/27 07:00 30.5 0.7 10.7 21.4 32.8 41.6
3 2009/02/27 08:00 32.2 1.6 12.4 23.3 34.5 43.0
4 2009/02/27 09:00 32.7 4.8 13.0 24.0 35.1 43.5
5 2009/02/27 10:00 26.7 0.3 6.5 17.6 28.1 36.9
6 2009/02/27 11:00
2009 Jun 11
1
Cluster analysis, defining center seeds or number of clusters
I use kmeans to classify spectral events in high and low 1/3 octave bands:
#Do cluster analysis
CyclA<-data.frame(LlowA,LhghA)
CntrA<-matrix(c(0.9,0.8,0.8,0.75,0.65,0.65), nrow = 3, ncol=2, byrow=TRUE)
ClstA<-kmeans(CyclA,centers=CntrA,nstart=50,algorithm="MacQueen")
This works well when the actual data shows 1,2 or 3 groups that are not
"too close" in a cross plot.
2009 Jun 01
1
installing sn package
...elp me in the this regards.
Thanks,
Shreyasee
[[alternative HTML version deleted]]
------------------------------
Message: 2
Date: Wed, 27 May 2009 18:09:27 +0800
From: Berwin A Turlach <berwin@maths.uwa.edu.au>
Subject: Re: [R] Constrained fits: y~a+b*x-c*x^2, with a,b,c >=0
To: amvds@xs4all.nl
Cc: r-help@r-project.org
Message-ID: <20090527180927.1814b009@berwin-nus1>
Content-Type: text/plain; charset=US-ASCII
G'day Alex,
On Wed, 27 May 2009 11:51:39 +0200
Alex van der Spek <amvds@xs4all.nl> wrote:
> I wonder whether R has methods for constrained fitting of...