I am confused by the following data.table behavior.  
Set up reproducible example
iris <- data.table(iris)[1:10]
iris[,row.ord:=.I]
Why does this:
iris[,Val1:=Sepal.Length[row.ord]+Sepal.Length[row.ord+1]]
give a different result compared to this:
iris[,Val2:=sum(Sepal.Length[row.ord:(row.ord+1)])]
#Warning messages:
#1: In row.ord:(row.ord + 1) :
#  numerical expression has 10 elements: only the first used
#2: In row.ord:(row.ord + 1) :
#  numerical expression has 10 elements: only the first used
Results
    Sepal.Length Sepal.Width Petal.Length Petal.Width Species row.ord Val Val1 Val2
 1:          5.1         3.5          1.4         0.2  setosa       1 5.1 10.0   10
 2:          4.9         3.0          1.4         0.2  setosa       2 4.9  9.6   10
 3:          4.7         3.2          1.3         0.2  setosa       3 5.1  9.3   10
 4:          4.6         3.1          1.5         0.2  setosa       4 4.9  9.6   10
 5:          5.0         3.6          1.4         0.2  setosa       5 5.1 10.4   10
 6:          5.4         3.9          1.7         0.4  setosa       6 4.9 10.0   10
 7:          4.6         3.4          1.4         0.3  setosa       7 5.1  9.6   10
 8:          5.0         3.4          1.5         0.2  setosa       8 4.9  9.4   10
 9:          4.4         2.9          1.4         0.2  setosa       9 5.1  9.3   10
10:          4.9         3.1          1.5         0.1  setosa      10 4.9   NA   10
 
     
     
     
    