Description Usage Arguments Value Examples
View source: R/getRandomData.R
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.
1 | 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
1 2 3 4 5 6 7 8 | ##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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.