Re: [R] get start and end date of ISO weeks giving a date as input

2016-09-09 Thread Veronica Andreo
Hello Enrico, 2016-09-08 10:41 GMT-03:00 Enrico Schumann : > Hi Veronica, > > please see inline. > > On Thu, 08 Sep 2016, Veronica Andreo writes: > > > Hello Luisfo and Enrico, > > > > Thanks for your help! I've been testing both > > solutions...

Re: [R] get start and end date of ISO weeks giving a date as input

2016-09-08 Thread Veronica Andreo
> # take the first day of the year as Date object, i.e. 2010-01-01 in our > example > ref.date <- as.Date(strptime(paste0(year(dd),"-01-01"), > format="%Y-%m-%d", tz="GMT")) > # the start and end dates > bound.dates <- ref.date + 7 * (week(dd)-1

[R] get start and end date of ISO weeks giving a date as input

2016-09-08 Thread Veronica Andreo
Hello list, Is there a quick way to get start and end date (%Y-%m-%d) from ISO weeks if I only have dates? For example, I have this date in which some event happened: "2010-08-21". Not only I want the ISO week, which I can obtain either with isoweek (lubridate) or ISOweek (ISOweek), but I want th

[R] multiple model selection for vglm models

2016-01-11 Thread Veronica Andreo
Hi list, I'm working with vglm (family tobit) models and I need to perform multiple model selection. Something similar to step or stepAIC, is there anything alike? I found that neither step nor stepAIC work for objects of class vglm. Has anybody worked with them and can give a hint on how to sele

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] help with script to get starting date of blooms

2014-07-18 Thread Veronica Andreo
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, then eleven 1 and all the rest are 0). I'm interested in extractin