Aggregate vector by its content

Ofer Gozlan

I have created the vector:

z = c(1,1,2,3,3)

Now I want to create a function that will convert my vector to:

z = c(1,2,3)
Richard Telford

Is this what you want?

unique(z)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Split vector into several vectors depending on its content

From Dev

Is it safe to call vector.resize(0) after moving its content

From Dev

Turn a vector's indexes into its content and vice-versa

From Dev

Turn a vector's indexes into its content and vice-versa

From Dev

Emplace an aggregate in std::vector

From Dev

std::vector of vectors deallocates its shared_ptr content (incorrect usage of stack solid objects?)

From Dev

targeting an element by its content and the content of its ancestors

From Dev

Split a vector by its sequences

From Dev

TextView will not center its content

From Dev

delete a folder and its content

From Dev

if condition changed by its content

From Dev

Relativelayout not wrapping its content

From Dev

Summernote will not edit its content

From Dev

Cloning an array with its content

From Dev

TextView will not center its content

From Dev

Get cell by its content

From Dev

Changing aggregate behavior during its lifetime

From Dev

Is an empty vector the size of its struct?

From Dev

Exclude an item and its content elements

From Java

Get the size of a directory (not its content)

From Dev

JTextPane - fit size to its content

From Dev

fit width of <td> to its content

From Dev

Make a div the size of its content

From Dev

Bitmap too small for its content

From Dev

Hide checkbox, but show its content

From Dev

Autosizing row to its content in Webix

From Dev

Priority queue changes its content

From Dev

Animating UIView shape and its content

From Dev

UITableView to fit its dynamic content?