0

I cannot understand the following super simple following thing:

df <- data.frame(time = as.numeric(seq(1,6,0.1)))
plouf <- as.numeric(0.4*(1:15))
plouf
[1] 0.4 0.8 1.2 1.6 2.0 2.4 2.8 3.2 3.6 4.0 4.4 4.8 5.2 5.6 6.0

I subset df as follows:

df[df$time %in% plouf,]
[1] 1.6 2.0 2.4 3.2 3.6 4.0 4.4 4.8 5.2 5.6 6.0

Why isn't there 1.2 or 2.8 ? It seems magical (but I am tired, so could be simple stupid mistake)

denis
  • 5,142
  • 1
  • 10
  • 36

0 Answers0