led_bulb.Rd
A function to standardize the random selection of bulbs for the LED project in BYUI's MATH 119.
led_bulb( number_bulbs = 1, seed = 9012017, dat = data4led::led_study, columns_keep = c("id", "hours", "intensity", "percent_intensity") )
number_bulbs | The number of bulbs to sample. Defaults to 1. The most changed argument to the function. |
---|---|
seed | is used to make the random sample reproducible. May change at teacher request. |
dat | is the data object from which the sample is taken. Defaults to led_study. |
columns_keep | are the columns that should be returned from dat. Defaults to keep all the columns. |
led_bulb(2, seed = 1976)#> # A tibble: 88 x 4 #> id hours intensity percent_intensity #> <int> <dbl> <dbl> <dbl> #> 1 52 0 804. 1 #> 2 52 26 818. 1.02 #> 3 52 91 813. 1.01 #> 4 52 192 812. 1.01 #> 5 52 293 813. 1.01 #> 6 52 403 811. 1.01 #> 7 52 503 814. 1.01 #> 8 52 597 813. 1.01 #> 9 52 692 817. 1.02 #> 10 52 808 818. 1.02 #> # … with 78 more rows