Re: [R] Decimal number

2012-08-08 Thread Petr PIKAL
Probably a problem in your setting or envirenment or print function Here is what I get > x1<-64.90 > x2<-17.7025 > c(x1,x2) [1] 64.9000 17.7025 > x<-c(x1,x2) > x [1] 64.9000 17.7025 > Regards Petr > > HI > > >i have a little problem please help me to solve it > > >this is the code in R: > >

Re: [R] Decimal number

2012-08-07 Thread arun
get the results:  `her beta`<-c(beta0,beta1)  `her beta` #[1] 64.90614 17.70250 A.K. - Original Message - From: Eloi Mercier To: hafida Cc: r-help@r-project.org Sent: Tuesday, August 7, 2012 5:02 PM Subject: Re: [R] Decimal number Hi hafida, I fail to understand the questio

Re: [R] Decimal number

2012-08-07 Thread hafida
HI >THANK YOU ALL OF YOU >THIS PROBLEM IS SOLVED >THANK YOU >hafida -- View this message in context: http://r.789695.n4.nabble.com/Decimal-number-tp4639428p4639467.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.o

Re: [R] Decimal number

2012-08-07 Thread arun
and beta with the full part after the comma" is confusing. A.K. - Original Message - From: hafida To: r-help@r-project.org Cc: Sent: Tuesday, August 7, 2012 4:37 PM Subject: Re: [R] Decimal number hello arun >her beta can be considered simply as an object. > when i wro

Re: [R] Decimal number

2012-08-07 Thread R. Michael Weylandt
to get the number of beta and beta with the full part after the >> comma > > thank you > hafida >> beta0 > [1] 64.90614 >> beta1 > [1] 17.7025 >> round(beta) > [1] 17 64 >> floor(beta) > [1] 17 64 > > >> From: michael.weyla...@gmail.com

Re: [R] Decimal number

2012-08-07 Thread R. Michael Weylandt
On Tue, Aug 7, 2012 at 11:47 AM, hafida wrote: > HI > >>i have a little problem please help me to solve it > >>this is the code in R: > >>> beta0 > [1] 64.90614 >> beta1 > [1] 17.7025 >> beta > [1] 17 64 > >>her beta<- c(beta0, beta1) > > thank you in advance > hafida Are you looking for the roun

Re: [R] Decimal number

2012-08-07 Thread arun
Hello Hafida, So, I guess the decimal number problem is solved. I'll check on it. A.K. From: hafida goual To: smartpink...@yahoo.com Sent: Tuesday, August 7, 2012 4:58 PM Subject: RE: [R] Decimal number thank you  a lot please can you visite my

Re: [R] Decimal number

2012-08-07 Thread Eloi Mercier
Hi hafida, I fail to understand the question. Could you elaborate please ? Is this what you want ? > beta0 = 64.90614 > beta1 = 17.7025 > beta<-c(beta0, beta1) beta [1] 64.90614 17.70250 As a side note, please keep in mind that R doesn't allow white space within variable name (name it her_bet

Re: [R] Decimal number

2012-08-07 Thread hafida
hello arun >her beta can be considered simply as an object. > when i wrote beta >I want to get the number of beta and beta with the full part after the comma hafida -- View this message in context: http://r.789695.n4.nabble.com/Decimal-number-tp4639428p4639452.html Sent from the R help mai

[R] Decimal number

2012-08-07 Thread hafida
HI >i have a little problem please help me to solve it >this is the code in R: >> beta0 [1] 64.90614 > beta1 [1] 17.7025 > beta [1] 17 64 >her beta<- c(beta0, beta1) thank you in advance hafida -- View this message in context: http://r.789695.n4.nabble.com/Decimal-number-tp4639428.html Se

Re: [R] decimal number format as quarter

2012-02-08 Thread Petr Savicky
On Wed, Feb 08, 2012 at 03:12:56PM +0100, Arnaud Gaboury wrote: > Hello, > > I have to deal with numbers with a decimal part as quarter, coming from two > systems with different way to show decimals. I need to tell R these are in > fact the same number. > > On one side my number are formatted t

Re: [R] decimal number format as quarter

2012-02-08 Thread Arnaud Gaboury
] decimal number format as quarter On Feb 8, 2012, at 15:48 , David Reiner wrote: > Looks like something priced in eighths; we deal with similar notation for > bonds and similar instruments. > >> x <- c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6) >> as.integer(x)+10*(x-as.integer(x)

Re: [R] decimal number format as quarter

2012-02-08 Thread Gabor Grothendieck
On Wed, Feb 8, 2012 at 9:12 AM, Arnaud Gaboury wrote: > Hello, > > I have to deal with numbers with a decimal part as quarter, coming from two > systems with different way to show decimals. I need to tell R these are in > fact the same number. > > On one side my number are formatted this way : 2

Re: [R] decimal number format as quarter

2012-02-08 Thread peter dalgaard
On Feb 8, 2012, at 15:48 , David Reiner wrote: > Looks like something priced in eighths; we deal with similar notation for > bonds and similar instruments. > >> x <- c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6) >> as.integer(x)+10*(x-as.integer(x))/8 > [1] 2.25 2.50 2.75 3.25 3.50 3.75 > > Adjust the 10 an

Re: [R] decimal number format as quarter

2012-02-08 Thread Arnaud Gaboury
- From: David Reiner [mailto:david.rei...@xrtrading.com] Sent: mercredi 8 février 2012 15:48 To: Arnaud Gaboury; jim holtman Cc: r-help@r-project.org Subject: RE: [R] decimal number format as quarter Looks like something priced in eighths; we deal with similar notation for bonds and similar

Re: [R] decimal number format as quarter

2012-02-08 Thread jim holtman
Message- > From: jim holtman [mailto:jholt...@gmail.com] > Sent: mercredi 8 février 2012 15:36 > To: Arnaud Gaboury > Cc: r-help@r-project.org > Subject: Re: [R] decimal number format as quarter > > will this do it for you: > >> x <- c(2.2, 2.4, 2.6, 3.2, 3.4

Re: [R] decimal number format as quarter

2012-02-08 Thread David Reiner
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Arnaud Gaboury Sent: Wednesday, February 08, 2012 8:45 AM To: jim holtman Cc: r-help@r-project.org Subject: Re: [R] decimal number format as quarter TY Jim, It do the trick. I was tryin

Re: [R] decimal number format as quarter

2012-02-08 Thread David Winsemius
On Feb 8, 2012, at 9:12 AM, Arnaud Gaboury wrote: Hello, I have to deal with numbers with a decimal part as quarter, coming from two systems with different way to show decimals. I need to tell R these are in fact the same number. On one side my number are formatted this way : 2.2 , 2.4 a

Re: [R] decimal number format as quarter

2012-02-08 Thread Arnaud Gaboury
Subject: Re: [R] decimal number format as quarter will this do it for you: > x <- c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6) > # get integer part > x.i <- as.integer(x) > # get fractional part > x.f <- (x * 10) %% 10 > # new result > result <- x.i + ifelse(x.f

Re: [R] decimal number format as quarter

2012-02-08 Thread jim holtman
will this do it for you: > x <- c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6) > # get integer part > x.i <- as.integer(x) > # get fractional part > x.f <- (x * 10) %% 10 > # new result > result <- x.i + ifelse(x.f == 2 + , .25 + , ifelse(x.f == 4 +

[R] decimal number format as quarter

2012-02-08 Thread Arnaud Gaboury
Hello, I have to deal with numbers with a decimal part as quarter, coming from two systems with different way to show decimals. I need to tell R these are in fact the same number. On one side my number are formatted this way : 2.2 , 2.4 and 2.6. On the other side, I have 2.25, 2.50 and 2.75. A