r - Change negative values in dataframe column to absolute value -
i have data.frame
this:
col1 col2 col3 col4 col5 col6 1 1982 0 0 -211 107 0 2 4412 0 989 0 296 0 3 0 -5051 0 -267 389 920 4 0 -2983 0 -215 0 1639 5 0 -1326 0 -861 0 0 6 3722 0 89 0 243 13349
how can change negative values absolute values?
abs(dat)
where dat
name of data frame.
Comments
Post a Comment