0

I am making a Roulette game in R. I want my final function to return a dataframe with the statistics of each turn, a string saying "Win" or "Lose", and an integer with the player's ending balance.

I am trying to write my return like this

return(df, gameStatus, endingBalance)

I realize that this isn't correct (I guess too much Python is coming through here), but what could I do to return all three objects from the same function?

Thanks!

325
  • 594
  • 8
  • 21

1 Answers1

0

This ended up answering my question. Thanks @det !

return(list(df, gameStatus, runningBalance))
325
  • 594
  • 8
  • 21