I'm looking a way to generate a random number for a day and that this random number remains stable for the day. The next day, the code will generate another random number and so on...
I have explored ways specially with a while loop but I didn't succeed.
MyRandomNumber <- sample(1:10, 1)
DayOfDate <- as.integer(format(as.Date(Sys.Date(), format = "%Y-%m-%d"), "%d"))
while() {
StockMyRandomNumber <- MyRandomNumber
}
Aucun commentaire:
Enregistrer un commentaire