# Decimal number

11 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Decimal number

 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
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 This post has NOT been accepted by the mailing list yet. Hello, I couldn't understand the post.  What's "her beta"? A.K.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by hafida On Tue, Aug 7, 2012 at 11:47 AM, hafida <[hidden email]> 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 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by arun kirshna 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
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by Michael Weylandt 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 <[hidden email]> 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: [hidden email] >> Date: Tue, 7 Aug 2012 14:56:16 -0500 >> Subject: Re: [R] Decimal number >> To: [hidden email] >> CC: [hidden email] >> >> On Tue, Aug 7, 2012 at 11:47 AM, hafida <[hidden email]> 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 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by hafida 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 <[hidden email]> To: [hidden email] 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.htmlSent from the R help mailing list archive at Nabble.com. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by hafida 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_beta instead). Cheers, Eloi ######## Salut Hafida, je ne comprend pas la question. Peux tu détailler stp ? Si c'est pour afficher les valeurs complètes de beta0 et beta1 alors l'exemple ci-dessus devrait faire l'affaire. Autrement, R n'autorise pas la présence d'espace dans le nom des variables. Cordialement, Eloi On 12-08-07 01:37 PM, hafida wrote: > 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. > > ______________________________________________ > [hidden email] 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. > > -- Eloi Mercier Bioinformatics PhD Student, UBC Paul Pavlidis Lab 2185 East Mall University of British Columbia Vancouver BC V6T1Z4 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by hafida Hello Hafida, So, I guess the decimal number problem is solved. I'll check on it. A.K. ________________________________ From: hafida goual <[hidden email]> To: [hidden email] 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: [hidden email] > Subject: Re: [R] Decimal number > To: [hidden email] > CC: [hidden email] > > 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 <[hidden email]> > To: [hidden email] > 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. > > ______________________________________________ > [hidden email] 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. > ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by Mercier Eloi HI >THANK YOU ALL OF YOU >THIS PROBLEM IS SOLVED >THANK YOU >hafida
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Decimal number

 In reply to this post by Mercier Eloi Hi, You are right, R doesn't allow white space within variable.   beta0 = 64.90614   beta1 = 17.7025  her beta<-c(beta0,beta1) #Error: unexpected symbol in "her beta"  "her beta"<-c(beta0,beta1)  "her beta" #[1] "her beta" #But, this will get the results:  `her beta`<-c(beta0,beta1)  `her beta` #[1] 64.90614 17.70250 A.K. ----- Original Message ----- From: Eloi Mercier <[hidden email]> To: hafida <[hidden email]> Cc: [hidden email] Sent: Tuesday, August 7, 2012 5:02 PM Subject: Re: [R] Decimal number 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_beta instead). Cheers, Eloi ######## Salut Hafida, je ne comprend pas la question. Peux tu détailler stp ? Si c'est pour afficher les valeurs complètes de beta0 et beta1 alors l'exemple ci-dessus devrait faire l'affaire. Autrement, R n'autorise pas la présence d'espace dans le nom des variables. Cordialement, Eloi On 12-08-07 01:37 PM, hafida wrote: > 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. > > ______________________________________________ > [hidden email] 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. > > -- Eloi Mercier Bioinformatics PhD Student, UBC Paul Pavlidis Lab 2185 East Mall University of British Columbia Vancouver BC V6T1Z4 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.