[R] c() coverts real numbers to integers?
jim holtman
jholtman at gmail.com
Fri Mar 6 19:53:15 CET 2009
There are real numbers:
> STX<-c(16.0962, 16.1227, 16.0921, 16.1498)
> STY<-c(2.0387, 2.0214, 1.9877, 1.9846)
> str(STX)
num [1:4] 16.1 16.1 16.1 16.1
> str(STY)
num [1:4] 2.04 2.02 1.99 1.98
>
So what is your question?
On Fri, Mar 6, 2009 at 1:47 PM, John Poulsen <jpoulsen at zoo.ufl.edu> wrote:
> Hello,
>
> I know I am forgetting to do something silly. I typed coordinates in
> vectors (as below) but when I call them in R they come out as integers,
> and I want them to be real numbers. I have tried using as.numeric,
> as.real, etc... but they are still read by R as integers.
>
> STX<-c(16.0962, 16.1227, 16.0921, 16.1498)
> STY<-c(2.0387, 2.0214, 1.9877, 1.9846)
>
> What am I doing wrong?
>
> Thanks for your help,
> John
>
> ______________________________________________
> 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 that you are trying to solve?
More information about the R-help
mailing list