Displaying 1 result from an estimated 1 matches for "1char".
Did you mean:
char
2009 Jun 09
2
removing elements from a "unit" vector
Dear list,
I'm quite surprised by this,
unit(1:5,"char")[-c(1:2)]
#4char 3char # what's going on??
while I expected something like,
c(1:5)[-c(1:2)]
# 3 4 5
Note that,
unit(1:5,"char")[c(1:2)]
# 1char 2char # fine
?unit warns about unit.c for concatenating, but also says,
It is possible to subset unit objects in the normal way (e.g., unit(1:5,"npc")[2:4])
Am I missing something obvious?
Thanks,
baptiste
sessionInfo()
R version 2.9.0 (2009-04-17)
i386-apple-darwin8.11.1
locale...