Re: [R] changing format of a float value to another

From: jim holtman <jholtman_at_gmail.com>
Date: Thu, 24 Apr 2008 08:21:26 -0400

?sprintf

> x <- "1.085714e-01"
> sprintf("%.4f", as.numeric(x))

[1] "0.1086"
>

On Thu, Apr 24, 2008 at 6:28 AM, orkun <temiz_at_deprem.gov.tr> wrote:
> hello
>
> How can I change a vector's float value from ("1.085714e-01") format to
> a simpler format (like 0.1xxx).
>
> regards
>
>
> --
> Ahmet Temiz
> Jeo. Müh.
> Afet İşleri Gen. Md.lüğü
> Deprem Ar. D.
>
> Ahmet Temiz
> Geo. Eng.
> General Dir. of
> Disaster Affairs
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> ______________________________________________
> 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.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?
______________________________________________
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.
Received on Thu 24 Apr 2008 - 13:26:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Apr 2008 - 13:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive