Basically, I want to make a copy of some array b after removing some elements. but not change the original b.
I tried splice!(b,1:2) and deleteat!(b,1:2) both would change b.
Thanks for any comments!
Julia has no built-in syntax that is equivalent to R’s vector[-indexes]
. Try something like
a = b[setdiff(1:end,indexes_to_remove)]
Of course for these particular elements,
b[3:end]
will also work.
That helps! Thanks both of you for the reply!