Skip to content

Instantly share code, notes, and snippets.

@cimentadaj
Created June 8, 2020 20:43
Show Gist options
  • Save cimentadaj/0fb05990484690935d3df64dbd1691f2 to your computer and use it in GitHub Desktop.
Save cimentadaj/0fb05990484690935d3df64dbd1691f2 to your computer and use it in GitHub Desktop.
library(tibble)
library(dplyr)
nombre <- c("barbastro", "teruel", "fuerteventura", "la palma", "talavera", "cuenca", "placencia", "la rioja", "burgos", "soria", "avila")
puntuacion <- c(6.61, 6.22, 6.65, 7.14, 6.72, 7.01, 7.04, 7.17, 7.21, 7.06, 7.35)
plazas <- c(16, 13, 5, 3, 14, 7, 8, 19, 5, 4, 4)
dt <- data.frame(
nombre = nombre,
puntuacion = puntuacion,
plazas = plazas
)
dt %>%
arrange(puntuacion, plazas)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment