Re: [R] Sequence generation in a table

2010-12-09 Thread Petr PIKAL
d to keep my problem > short in oder not to consume your valuable time. > > Regards > > Vince Pyne > > > > --- On Thu, 12/9/10, Petr PIKAL wrote: > > From: Petr PIKAL > Subject: Re: [R] Sequence generation in a table > To: "Vincy Pyne" > Cc

Re: [R] Sequence generation in a table

2010-12-09 Thread Henrique Dallazuanna
wever if there are number of > bonds (say 1000) in the portfolio, my method of converting the days > individually is not practical. > > I am extremely sorry for the inconvenience caused. I tried to keep my > problem short in oder not to consume your valuable time. > > Regards &

Re: [R] Sequence generation in a table

2010-12-09 Thread Liviu Andronic
On Thu, Dec 9, 2010 at 1:24 PM, Vincy Pyne wrote: > yy <- lapply(c(257, 520, 110), seq, to=0, by=-100) > > yy/360, I get following error. > > Error in yy/360 : non-numeric argument to binary operator > > On the other hand, > > yy[[1]]/365  fetches me > > [1] 0.7138889 0.436 0.158 >

Re: [R] Sequence generation in a table

2010-12-09 Thread Vincy Pyne
, Petr PIKAL wrote: From: Petr PIKAL Subject: Re: [R] Sequence generation in a table To: "Vincy Pyne" Cc: r-help@r-project.org Received: Thursday, December 9, 2010, 12:03 PM Hi r-help-boun...@r-project.org napsal dne 09.12.2010 12:41:47: > Dear Sir, > > Sorry to bother y

Re: [R] Sequence generation in a table

2010-12-09 Thread Petr PIKAL
cy Pyne > > > --- On Thu, 12/9/10, Jan van der Laan wrote: > > From: Jan van der Laan > Subject: Re: [R] Sequence generation in a table > To: r-help@r-project.org, vincy_p...@yahoo.ca > Received: Thursday, December 9, 2010, 10:57 AM > > Vincy, > > I suppo

Re: [R] Sequence generation in a table

2010-12-09 Thread Liviu Andronic
On Thu, Dec 9, 2010 at 12:41 PM, Vincy Pyne wrote: > The biggest constraint for me is here as an example I have taken only three > cases i.e. c(257, 520, 110), however in reality I will be dealing with no of > cases and that number is unknown. But your code will certainly generate me > the requ

Re: [R] Sequence generation in a table

2010-12-09 Thread Vincy Pyne
rbing you Sir and hope I am able to put up my problem in a proper manner. Regards Vincy Pyne --- On Thu, 12/9/10, Jan van der Laan wrote: From: Jan van der Laan Subject: Re: [R] Sequence generation in a table To: r-help@r-project.org, vincy_p...@yahoo.ca Received: Thursday, December 9, 2010,

Re: [R] Sequence generation in a table

2010-12-09 Thread Jan van der Laan
Vincy, I suppose the following does what you want. yy is now a list which allows for differing lengths of the vectors. > yy <- lapply(c(257, 520, 110), seq, to=0, by=-100) > yy[[1]] [1] 257 157 57 > yy[[2]] [1] 520 420 320 220 120 20 Regards, Jan On 9-12-2010 11:40, Vincy Pyne wrote: c(