So, these two are totally different root vegetables!  First, the skins are quite different.  Yams have a dark, bumpy, tough skin while sweet potatoes have reddish-orange, thin, smoother skin.  The flesh differs as well.  Sweet potatoes have a smooth, sweet flesh while yams have a more fibrous non-sweet flesh.  For these reasons, I would not use yams for this recipe.