4
Is there any function in R
to obtain the module of a negative number or a number vector?
example:
v <- c(1,-2,3,-4)
module(v)
#> [1] 1 2 3 4
4
Is there any function in R
to obtain the module of a negative number or a number vector?
example:
v <- c(1,-2,3,-4)
module(v)
#> [1] 1 2 3 4
7
Use the function abs
(value absoluto):
> v <- c(1,-2,3,-4)
> abs(v)
[1] 1 2 3 4
Browser other questions tagged r
You are not signed in. Login or sign up in order to post.