How To Order In R

Asked

Viewed 42 times

1

How to sort numbers in r

dados = order(dados, decreasing = F)
dados

Here only orders the position... I wanted to know a method of sorting the numbers that are in the given list: dados = c(8,6,5,4,1,3,7)

1 answer

0

You can use the Sort

dados = c(8,6,5,4,1,3,7)
dados = sort(dados, decreasing = F)
dados

Exit

1 3 4 5 6 7 8

Browser other questions tagged

You are not signed in. Login or sign up in order to post.