"
To: "lin tang"
Cc:
Sent: Monday, March 03, 2008 11:38 AM
Subject: Re: [R] R function to convert a number to text
> lin tang wrote:
>> hi, Dear R users -
>>
>> I wonder is there a written R function to convert a number to a
>> text, say convert 1 to
Alberto Monteiro wrote:
> ...
> Be careful, the function does not handle "empty" fields:
Okay, Alberto, you asked for it!
digits2text<-function(x,illion=0) {
units<-c("one","two","three","four","five",
"six","seven","eight","nine")
teens<-c("ten","eleven","twelve","thirteen","fourteen",
Try
RSiteSearch("numbers2words")
On Sun, Mar 2, 2008 at 9:05 PM, lin tang <[EMAIL PROTECTED]> wrote:
> hi, Dear R users -
>
> I wonder is there a written R function to convert a number to a text, say
> convert 1 to "one" , 100 to "one hundred". I know in xls. has such a
> function BAHTTEXT, d
Sent: Monday, March 03, 2008 11:38 AM
Subject: Re: [R] R function to convert a number to text
> lin tang wrote:
>> hi, Dear R users -
>>
>> I wonder is there a written R function to convert a number to a
>> text, say convert 1 to "one" , 100 to "one
Jim Lemon wrote:
>
> I got bored after the millions, but this should handle the smaller
> numbers, and you can always extend it.
>
> digits2text<-function(x,mult="") {
> units<-c("one","two","three","four","five",
>"six","seven","eight","nine")
> teens<-c("ten","eleven","twelve","thirtee
lin tang wrote:
> hi, Dear R users -
>
> I wonder is there a written R function to convert a number to a text, say
> convert 1 to "one" , 100 to "one hundred". I know in xls. has such a
> function BAHTTEXT, does anybody know is there a similar function in R ?
> Thanks.
>
Hi Lin,
I got bored a
hi, Dear R users -
I wonder is there a written R function to convert a number to a text, say
convert 1 to "one" , 100 to "one hundred". I know in xls. has such a function
BAHTTEXT, does anybody know is there a similar function in R ? Thanks.
Lin
-
7 matches
Mail list logo