How to define format of number

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to define format of number

mrzung
hi all,

What I want to do is show a number with thousand expression.

I dont know exactly the expression name but here is example.

 1,000
 10,000,000
 
is there a way to express a number like that?
Reply | Threaded
Open this post in threaded view
|

Re: How to define format of number

jholtman
try this:

> prettyNum(100000000, big.mark = ",")
[1] "100,000,000"
>




On Fri, Apr 13, 2012 at 3:35 PM, mrzung <[hidden email]> wrote:

> hi all,
>
> What I want to do is show a number with thousand expression.
>
> I dont know exactly the expression name but here is example.
>
>  1,000
>  10,000,000
>
> is there a way to express a number like that?
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/How-to-define-format-of-number-tp4555778p4555778.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.
>



--
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

        [[alternative HTML version deleted]]

______________________________________________
[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.
Reply | Threaded
Open this post in threaded view
|

Re: How to define format of number

Bert Gunter
In reply to this post by mrzung
Well...

?format

(strangely enough).
Try searching in R at least a wee bit before posting.

-- Bert

On Fri, Apr 13, 2012 at 12:35 PM, mrzung <[hidden email]> wrote:

> hi all,
>
> What I want to do is show a number with thousand expression.
>
> I dont know exactly the expression name but here is example.
>
>  1,000
>  10,000,000
>
> is there a way to express a number like that?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-define-format-of-number-tp4555778p4555778.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.



--

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

______________________________________________
[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.