I want to try making a scratch cake; sweet potatoe spice cake; but I have yams and not any sweet potatoes. Would this work if I substituted yams for sweet potatoes?
Without getting into a whole food history lesson, in the US, yams and sweet potatoes are one and the same (although you can get different varieties/colors). True Yams are very rare in the US and what some people call yams are really the same old sweet potatoes.
So, to answer your questions, yes, you can use them.