When I create a df like shown below, I can not access value with vol==0.7
shrink[vol==0.7,]
does not work, but all the others do.
Can anyone let know what the reason for this might be?
vol <- seq(0,1,0.01)
sh <- 1- vol^(1/3)
shrink <- as.data.frame(cbind(vol=vol,sh))
xmin <- 0.2; xmax <-0.7
ymin <- shrink[vol==xmax,][,2]; ymax <- shrink[vol==xmin,][,2]
p1 <- ggplot(shrink, aes(vol,sh)) + geom_line() + xlim(xmin,xmax)+ ylim(ymin, ymax)