Re: [R] help with script to get starting date of blooms

2014-07-19 Thread Veronica Andreo
Hi Jim 2014-07-19 8:25 GMT-03:00 Jim Lemon : > > Hi Vero, > I think this does what you want, even though it doesn't do it the way > you describe above. > > cla<-runif(506)+ > rep(c(seq(1,3,length.out=23),seq(3,1,length.out=23)),11) > obs_time<-paste(rep(1:11,each=46),rep(1:46,11),sep="_") > t_ma

[R] understanding the parameters of 'spca' function of 'elasticnet' package

2014-07-19 Thread Adib Shafi
Hi all, i am trying to use the 'spca' function of 'elasticnet' package. But i am confused with the parameter 'para'. Basically the parameter 'para' depends on the parameter 'sparse'. If sparse="penalty", para is a vector of 1-norm penalty parameters. If sparse="varnum", para defines the number o

Re: [R] String comparison, trailing blanks make a difference.

2014-07-19 Thread Hadley Wickham
If you have unicode strings, you may need to do even more because there are often multiple ways of representing the same glyph. I made a little demo at http://rpubs.com/hadley/unicode-normalisation, since any unicode characters are likely to get mangled by email. Hadley On Fri, Jul 18, 2014 at 11

Re: [R] String comparison, trailing blanks make a difference.

2014-07-19 Thread John McKown
On Fri, Jul 18, 2014 at 11:17 AM, John McKown wrote: > Well, this was a shock to me. And I don't really see any documentation > about it, but perhaps I just can't see it. > >>"abc" == "abc " > [1] FALSE > > I guess that I thought of strings in R like I do is some other > languages where the shorte

Re: [R] using postscript() for multiple individual files

2014-07-19 Thread Ingo Wardinski
On 07/19/2014 07:17 PM, William Dunlap wrote: Wrap all your calls to plot() with print(). E.g., change plot(s, type="vectors", idx=1:12, main="") to print(plot(s, type="vectors", idx=1:12, main="") Some plot methods require their output to be printed to display, some don't. Some help f

[R] nlxb CI

2014-07-19 Thread Andras Farkas
Dear All, wonder if someone could point me in the direction of calculating confidence intervals for model parameters generated by nlxb() in the nlmrt package? confint() as is gives the following message: no applicable method for 'vcov' applied to an object of class "nlmrt". appreciate the input

Re: [R] using postscript() for multiple individual files

2014-07-19 Thread William Dunlap
Wrap all your calls to plot() with print(). E.g., change plot(s, type="vectors", idx=1:12, main="") to print(plot(s, type="vectors", idx=1:12, main="") Some plot methods require their output to be printed to display, some don't. Some help files for plot methods mention this requirement, so

Re: [R] using postscript() for multiple individual files

2014-07-19 Thread Ingo Wardinski
On 07/19/2014 01:25 PM, Duncan Murdoch wrote: On 19/07/2014, 5:41 AM, Ingo Wardinski wrote: Hello, I try to plot some results of an analysis to multiple individual postscript files, like: postscript("A1_zonflow.ps",onefile=F) plot(s, type = "vectors", idx = 1:12,main="") dev.off() #

Re: [R] How to bin x,y,z vectors into matrix?

2014-07-19 Thread William Dunlap
You could use tapply() and cut() in base R, as in > tapply(d$z, INDEX=list(y=cut(d$y,breaks=seq(900,1300,by=100)), > x=cut(d$x,breaks=seq(35,60,by=5))), FUN=mean) x y(35,40] (40,45] (45,50] (50,55] (55,60] (900,1e+03] 1644.779 1643.957 NA

Re: [R] How to bin x,y,z vectors into matrix?

2014-07-19 Thread Sarah Goslee
Hi Mark, First you need to use cut() to bin the values. Here's an example: # generate some fake data temp <- data.frame(x=runif(20), y=runif(20), z=runif(20)) # bin x and y temp$x <- cut(temp$x, seq(0, 1, by=.2)) temp$y <- cut(temp$y, seq(0, 1, by=.2)) >From there, there are all sorts of ways to

[R] How to bin x,y,z vectors into matrix?

2014-07-19 Thread Mark Miller
This is probably a basic question, but I haven't been able to Google anything helpful after trying for days. I have an R dataframe with x,y,z tuples, where z is a response to x and y and can be modeled as a surface. > head(temp) x yz 1 36.55411 965.7779 1644.

Re: [R] using postscript() for multiple individual files

2014-07-19 Thread Duncan Murdoch
On 19/07/2014, 5:41 AM, Ingo Wardinski wrote: > Hello, > I try to plot some results of an analysis to multiple individual > postscript files, like: >postscript("A1_zonflow.ps",onefile=F) >plot(s, type = "vectors", idx = 1:12,main="") >dev.off() > # >postscript("vectors_paired_zonfl

Re: [R] help with script to get starting date of blooms

2014-07-19 Thread Jim Lemon
On Fri, 18 Jul 2014 10:15:35 AM Veronica Andreo wrote: > Hi list > > I have a vector, which are remotely sensed chlorophyll values for a certain > pixel in 11 years, then i have a flag or label vector (t_max) that consists > of 0 and 1, which tells me where i have the annual peak (one per year,

[R] using postscript() for multiple individual files

2014-07-19 Thread Ingo Wardinski
Hello, I try to plot some results of an analysis to multiple individual postscript files, like: postscript("A1_zonflow.ps",onefile=F) plot(s, type = "vectors", idx = 1:12,main="") dev.off() # postscript("vectors_paired_zonflow.ps",onefile=F) plot(s, type = "paired", idx = 1:12,plot.con

[R] R code for Forecasting ARDL

2014-07-19 Thread Ibrahim Alfaki
Dear list members I appreciate if anyone share with or direct me to a source or R code for forecasting ARDL(p,q) times series using Monte Carlo simulation. Kind regards I. Mohamed, CBE, UAEU [[alternative HTML version deleted]] __ R-help@r-p