Open ecrs98 opened 1 year ago
Thanks for your issue @ecrs98 ! I'm so glad it makes coding more fun.
What do you think @aedobbyn ? Does this seem like a good idea, and if so, can it be done easily?
@ecrs98 let's wait a bit to see if amanda responds. if not soon, we can move ahead discussing this
hi, so glad you like the package! so my first instinct here is that it would be possible to do of course, but that this argument would be redundant given that it's covered by the other two already there so i don't love it design-wise. what do you think @sckott?
Thanks @aedobbyn ! One idea is we could do in the function definition
say <- function(what="Hello world!", by="cat",
type=NULL,
what_color=NULL, by_color=what_color, <---------
length=18, fortune=NULL, ...)
Where we set by_color
to be whatever is set in what_color
UNLESS by_color
is set to something by the user. NULL
is still the default for by_color
here.
I agree I don't think we should add a new parameter.
Hey Scott,
Just wondering, would it be possible to add functionality to
say()
that would allow for a singlecolor
argument? Having separate arguments forwhat_color
andby_color
is necessary. Most of the time, though, I specify these to be the same color. It would be nice to specifycolor = "blue"
, for example, and have that be equivalent towhat_color = "blue", by_color = "blue"
.Love the package by the way. Makes my coding work flow a little more fun :-)
thanks!
--Ethan