Solving cubics diophantines

i am new to R, coming from Matalab.

How do I solve this basic cubic diophantine in R?

x^2 + y^3 == 31

I am expecting to get x={-2,2} and y={3}

I could only find {nlide}, which is limited to the linear case. As a guess, {deSolve} may be able to handle this as a dynamically running to steady-state problem.