powered by
removezeros(X)
X = c(1,0,2,0,3) removezeros(X) ## equivalently X[X!=0]
Run the code above in your browser using DataLab