vnorm(c(3, 4)) #=> 5 Pythagoras triple
vnorm(c(1, 1, 1), p=2) # sqrt(3)
vnorm(1:10, p = 1) # sum(1:10)
vnorm(1:10, p = 0) # Inf
vnorm(1:10, p = Inf) # max(1:10)
vnorm(1:10, p = -Inf) # min(1:10)
Run the code above in your browser using DataLab