Lists hold related values that do not need to share a type or length.

Program

Play the script to group a name with scores and build a label from both.

lists.R
person <- list(name = "Ada", scores = c(9, 10))
best <- max(person$scores)
label <- paste(person$name, best)
cat(label, "\n", sep = "")
list `list` groups named values together.
$ `person$scores` reads one named list element.
max `max` returns the largest numeric value.