a guest Dec 18th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set.seed(2018)
  2. df1 <- data.frame(claves = letters[1:3],    # a, b y c
  3.                   stringsAsFactors = FALSE)
  4. df2 <- data.frame(claves = sample(letters, 100, replace = TRUE), #100 letras al azar, algunas son a, b o c
  5.                   estadisticos = rnorm(100),                     #Unos datos numéricos al azar que simulan los estadísticos
  6.                   stringsAsFactors = FALSE)
  8. df2[df2$claves %in% df1$claves, ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand