AlexsLemonade / scpcaTools

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

[BUG] Resetting seeds with NULL #280

Closed jashapiro closed 2 months ago

jashapiro commented 2 months ago

Describe the bug

I realized that if we pass in NULL to seed parameters of a variety of functions, we are not performing a no-op on setting the seed as we should but are instead resetting it to be random. That isn't what we intended, and was probably my misreading of the docs.

Fix

replace all bare calls to set.seed(seed) in function calls with

if (!is.null(seed)){
    set.seed(seed)
}