Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
new_player <- function(name, points) { p <- list(name = name, points = points) class(p) <- "player" p } print.player <- function(x, ...) { cat("Player:", x$name, "\n") cat("Points:", x$points, "\n") } john <- new_player("John", 45) john
Player: John
Points: 45