R> class(1:3) [1] "integer" R> class(c(1,3)) [1] "numeric" R>
简而言之,:因为序列运算符返回整数“因为这是人们真正想要的”.
因此:
R> identical(1:3,c(1L,2L,3L)) [1] TRUE R> identical(1*(1:3),3)) [1] TRUE R>