Dear researchers,

sorry I know it's no the right mailist but I have this problem.

mydf <- data.frame(id=c(1,2,3,4,5),value=c(2,3,-5,6,-4))
  id value
1  1     2
2  2     3
3  3    -5
4  4     6
5  5    -4

I wish to select and change the value of negative number

mydf[mydf$value >= -4 & mydf$value <= -5, c(2)] <- 100

to have

  id value
1  1     2
2  2     3
3  3    100
4  4     6
5  5    100

but the normal expression doesn't work because they are negative value

thanks in advance
Gianni

	[[alternative HTML version deleted]]

