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 Sent from the R help mailing list archive at Nabble.com.
On Tue, Aug 7, 2012 at 11:47 AM, hafida <hafida-06 at hotmail.fr> 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 > hafidaAre you looking for the round() function? Or, given the results you gave, possibly floor()? Best, Michael
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 thecomma hafida -- View this message in context: http://r.789695.n4.nabble.com/Decimal-number-tp4639428p4639452.html Sent from the R help mailing list archive at Nabble.com.
Are you simply looking for c() then? I'm afraid I simply don't understand your question: R> b1 <- 64.90614 R> b2 <- 17.7025 R> c(b1, b2) [1] 64.90614 17.70250 Perhaps you need to adjust options()$digits For me (and I believe by default) it is 7, but you can change it with a command such as options(digits = 10) if you want more decimal places. Also, please continue to cc the R-help list on all correspondance. Best, Michael On Tue, Aug 7, 2012 at 3:40 PM, hafida goual <hafida-06 at hotmail.fr> wrote:> HI > > I try the code > >> when i wrote beta >>I want 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.weylandt at gmail.com >> Date: Tue, 7 Aug 2012 14:56:16 -0500 >> Subject: Re: [R] Decimal number >> To: hafida-06 at hotmail.fr >> CC: r-help at r-project.org >> >> On Tue, Aug 7, 2012 at 11:47 AM, hafida <hafida-06 at hotmail.fr> 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 round() function? Or, given the results you >> gave, possibly floor()? >> >> Best, >> Michael
Hello, ? beta0<-64.90614 ?beta1<-17.7025 ?herbeta<-c(beta0,beta1) ?herbeta [1] 64.90614 17.70250 So, here you have "herbeta" (or is it simply "beta") assigned to the vector containing values of beta0 and beta1.? Your statement "I want to get the number of beta and beta with the full part after the comma" is confusing. A.K. ----- Original Message ----- From: hafida <hafida-06 at hotmail.fr> To: r-help at 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 wrote beta >I want to get the number of beta and beta with the full part after thecomma hafida -- View this message in context: http://r.789695.n4.nabble.com/Decimal-number-tp4639428p4639452.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Hello Hafida, So, I guess the decimal number problem is solved. I'll check on it. A.K. ________________________________ From: hafida goual <hafida-06 at hotmail.fr> To: smartpink111 at yahoo.com Sent: Tuesday, August 7, 2012 4:58 PM Subject: RE: [R] Decimal number thank you ?a lot please can you visite my post titled ?"executed function". hafida> Date: Tue, 7 Aug 2012 13:55:00 -0700 > From: smartpink111 at yahoo.com > Subject: Re: [R] Decimal number > To: hafida-06 at hotmail.fr > CC: r-help at r-project.org > > Hello, > > ? beta0<-64.90614 > ?beta1<-17.7025 > ?herbeta<-c(beta0,beta1) > ?herbeta > [1] 64.90614 17.70250 > > So, here you have "herbeta" (or is it simply "beta") assigned to the vector containing values of beta0 and beta1.? > Your statement > "I want to get the number of beta and beta with the full part after the > comma" > is confusing. > A.K. > > > > > > ----- Original Message ----- > From: hafida <hafida-06 at hotmail.fr> > To: r-help at 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 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 mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
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: > > >> 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 > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.