R array manipulation -


In python lists this can be truncated as x [4: -1]

Some can be completed with x [4: length (x)] for similar vectors and for multi-functional arrays such as x [,,,, 4: dim (x) [5], ,,,] . Is it a more elegant syntax for the action of slicing arrays from a element to the last element of a particular dimension?

Thanks

You can use drop element syntax:

  & gt; (1:10) [- (1: 4)] [1] 5 6 7 8 9 10  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -