ComenzarEmpieza gratis

Variable precedence 1

Consider this code, run in a fresh R session.

x_plus_y <- function(x) {
  y <- 3
  x + y
}
y <- 7

If you now call x_plus_y(5), what is the result?

Este ejercicio forma parte del curso

Introduction to Writing Functions in R

Ver curso

Ejercicio interactivo práctico

Pon en práctica la teoría con uno de nuestros ejercicios interactivos

Empezar ejercicio