Preheat oven to 350 degrees. Butter a 9 x 13 inch casserole dish. Spread the yams or sweet potatoes and apples in the casserole dish. In a small saucepan, melt the butter, brown sugar, cinnamon and salt, cooking and stirring until sugar has dissolved. Pour over yams and apples. Sprinkle pecans over top. Cover with foil and bake for 1 hour. When yams are soft, uncover and cook for another 10 minutes.