grambank / rgrambank

R package to access and analyse Grambank's CLDF data
Apache License 2.0
4 stars 1 forks source link

add random seed argument to language_level_DF #24

Closed HedvigS closed 1 year ago

HedvigS commented 1 year ago

add "random_seed = NULL" to arguments

    #There is a random element in the duplicate dropping. If you want it to give the same result everytime, set a random seed.
if(is.numeric(random_seed)){
    set.seed(random_seed)
}
SimonGreenhill commented 1 year ago

Users can just use set.seed() before calling the function - adding this to the function means we need to document and maintain more code, and our function messes with the global environment scope (.Random.seed)