I have the following array in the R:
FC12h FC10d FC6w
-8.44770875 -0.37171750 0
-56.72384575 2.64778150 2.94636550
-3.00214850 2.64778150 -1.57755700
I need some function that causes numbers greater than zero to have a value of 1, less than zero value equal to -1, and when 0 equals 0:
FC12h FC10d FC6w
-1 -1 0
-1 1 1
-1 1 -1
Does anyone know how I can do this?