FAQ 7.31

Sent from my Verizon Wireless 4G LTE Smartphone

<div>-------- Original message --------</div><div>From: Matthew Keller 
<mckellerc...@gmail.com> </div><div>Date:07/03/2014  11:28  (GMT-08:00) 
</div><div>To: r help <r-help@r-project.org> </div><div>Subject: [R] odd 
behavior of seq() </div><div>
</div>Hi all,

A bit stumped here.

z <- seq(.05,.85,by=.1)
z==.05     #good
[1]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

z==.15  #huh????
[1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

More generally:
> sum(z==.25)
[1] 1
> sum(z==.35)
[1] 0
> sum(z==.45)
[1] 1
> sum(z==.55)
[1] 1
> sum(z==.65)
[1] 0
> sum(z==.75)
[1] 0
> sum(z==.85)
[1] 1

Does anyone have any ideas what is going on here?

> R.Version()
$platform
[1] "x86_64-apple-darwin9.8.0"

$arch
[1] "x86_64"

$os
[1] "darwin9.8.0"

$system
[1] "x86_64, darwin9.8.0"

$status
[1] ""

$major
[1] "2"

$minor
[1] "13.1"

$year
[1] "2011"

$month
[1] "07"

$day
[1] "08"

$`svn rev`
[1] "56322"

$language
[1] "R"

$version.string
[1] "R version 2.13.1 (2011-07-08)"

-- 
Matthew C Keller
Asst. Professor of Psychology
University of Colorado at Boulder
www.matthewckeller.com

[[alternative HTML version deleted]]

______________________________________________
R-help@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.

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to