I have `503`

datapoints and I want to cut away the last 250 to get the 253.

I tried `cut`

,but these function only gives me groups back…

How can I do that in R?

Skip to content
# R – cut a vector

###### Related Question

rstatistics

I have `503`

datapoints and I want to cut away the last 250 to get the 253.

I tried `cut`

,but these function only gives me groups back…

How can I do that in R?

- R – How to sum a variable by group
- R – Concatenate a vector of strings/character
- R – Grouping functions (tapply, by, aggregate) and the *apply family
- R – Drop data frame columns by name
- R – Changing column names of a data frame
- R – How to we make xkcd style graphs
- R – How to view the source code for a function
- R – data.table vs dplyr: can one do something well the other can’t or does poorly

## Best Solution

In addition to the above answer, you can pass any vector in the square brackets to reduce your vector. The above case you are dropping the last 250 values. You can play around with the values inside the square brackets to get different results

etc...