diff --git a/R/bard.bits.R b/R/bard.bits.R index 4201217..1b6e320 100644 --- a/R/bard.bits.R +++ b/R/bard.bits.R @@ -48,17 +48,20 @@ bard.bits <- function(cat, valid_cats, several.ok = FALSE) - if(missing(seed)){ + + if (missing(seed)) { set.seed(NULL) + } else { - if (is.numeric(seed)){ - set.seed(seed) + if (!is.numeric(seed)) { + + seed <- set.char.seed(seed) } - seed <- set.char.seed(seed) set.seed(seed) } + if(cat == "any"){ adjs <- rbind(shake_adjectives,shake_clrs, dsm_5) one_adj <- sample(unique(adjs$values),1) diff --git a/R/demotivate.R b/R/demotivate.R index b386578..912adb2 100644 --- a/R/demotivate.R +++ b/R/demotivate.R @@ -37,15 +37,15 @@ demotivate <- function(cat = "any", valid_cats, several.ok = FALSE) - if(missing(seed)){ + if (missing(seed)) { set.seed(NULL) + } else { + if (!is.numeric(seed)) { - if (is.numeric(seed)){ - set.seed(seed) + seed <- set.char.seed(seed) } - seed <- set.char.seed(seed) set.seed(seed) } diff --git a/R/motivate.R b/R/motivate.R index 7b55218..2622045 100644 --- a/R/motivate.R +++ b/R/motivate.R @@ -40,14 +40,15 @@ motivate <- function(cat = "any", valid_cats, several.ok = FALSE) - if(missing(seed)){ + if (missing(seed)) { set.seed(NULL) + } else { - if (is.numeric(seed)){ - set.seed(seed) + if (!is.numeric(seed)) { + + seed <- set.char.seed(seed) } - seed <- set.char.seed(seed) set.seed(seed) }