getRandomData {ncldata} | R Documentation |
This function creates a subset (of random rows) of a data set (by default, the IMDB movie data frame). Given a student id, this function will always return the same subset.
getRandomData(seed, d = movies)
seed, |
e.g "b1234567" or 18 |
d, |
optional (default: movies), dataset to get a random subset from. |
A data frame with a random numer of rows
##Given the same student ID ##the same data set is returned d1 = getRandomData("b1234567") d2 = getRandomData("b1234567") identical(d1, d2) ##Different IDs get different data d3 = getRandomData("b1234568") identical(d1, d3)