[Rd] Why doesn't R have a float data type?

Hervé Pagès hpages at fredhutch.org
Tue Jun 30 19:51:17 CEST 2015


Hi Charles,

Probably for the same reason it doesn't have short int, short unsigned
int, long int, long unsigned int, long long int, long long unsigned int,
long double etc... There are many built-in types in C and, in order
to keep things simple, I guess the line had to be drew somewhere.
Said otherwise, I don't think the atomic types in R were ever meant to
reflect exactly what's available in C.

Note that some CRAN packages (e.g. bit64) try to remedy this by
providing support for atomic-like types that are not natively supported
by R. I don't know if there is one for float though.

Cheers,
H.

On 06/30/2015 09:42 AM, Charles Determan wrote:
> This is strictly a curiosity question.  I am aware the R doesn't possess a
> float data type.  I also don't mean to request that such functionality be
> implemented as I'm sure it would require a large amount of work with
> potential back compatibility conflicts.  But I wanted to know why R has
> never had a float data type available?
>
> Regards,
> Charles
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the R-devel mailing list