[R] complain about a[-integer(0)]
PO SU
rhelpmaillist at 163.com
Sat Oct 11 11:25:14 CEST 2014
Dear helpeRs,
let a <- 1:10
let b <- integer(0) first, then i will randomly write a integer differently in the range(1,10) or NULL into b. for supposed 5 times.
then i want to get a[-b],that means i not want the values at index b.
if any time of 5 times generate a integer, it works fine. but when all the 5 times generate NULL, it can't work!
Because of the a[-integer(0)] =integer(0) .
I ask the same question once before, now i encount it again, i think a[-integer(0)] should return a not integer(0) !
Is any one have the same idea with me ? or give me a oppisite case that a[-integer(0)] need to be integer(0) ?
--
PO SU
mail: desolator88 at 163.com
Majored in Statistics from SJTU
More information about the R-help
mailing list