A spike relay just has four states (kOff, kOn, kForward, and kReverse IIRC) while a joystick is usually a continuous value from -1 to 1. An easy way if you're trying to do this would be an if-then-elseif-then-else block similar to this:
Code:
if (joystick_input > 0.25)
then relay.set(kFORWARD);
else if (joystick_input < -0.25)
then relay.set(kReverse);
else relay.set(kOff);