Absolute Value easy
R Basics

Write an R function solution(x) that returns the absolute value of each element in the numeric vector x.

Example

solution(c(-5, -3, 2, 0))  →  c(5, 3, 2, 0)
solution.py
14px
📊 Test Results
Run your code to see test results here.