Yams and sweet potatos are full of natural sugars, but they are also quite nutritious. In the grand scheme of things, they are quite better than many dessert style dishes you could feed yourselves :)
It's important to note that yams and sweet potatoes are not in the same botanical "family". Yams are part of the Dioscoreaceae family - found in the tropics. Sweet potatos are part of the Convolvulaceae family, related to morning glories! They are completely different types of vegetables. Neither are related at all to potatoes.
Sweet potatoes have:
28g per 1 baked sweet potato
27g per 1 boiled sweet potato (without peel)
59g per 1 cup mashed sweet potato
36g per 1 cup raw
If you're going for a candied yam dish or a sweet potato with brown sugar dish, realize that you are consuming a TON of sugar and should plan for a long walk afterwards :)
NOTE: Someone recently asked me why some diets say sweet potatoes are healthy and in contrast the low carb diet suggests you avoid them. It's sort of like asking why a low fat diet says to eat a ton of pasta - while a low carb diet says not to eat pasta. They have different points of view on foods.
Here's the thing with sweet potatoes, for example. First off, they aren't potatoes. They're related to the morning glory flower. So it's important to think of them as "a vegetable" and not as "a potato" even though it has that name.
You are getting 28g of sugars into you from just one sweet potato. That is a TON of sugar. Now, an exercise site is going to say "well sweet potatoes have good nutrition in them - so you eat them for nutrition, then you go play basketball for an hour to burn off the sugar and build up muscle. You end up with nutrition and also energy for your exercise plans".
However, Low Carb doesn't assume that its eaters are going out and playing basketball or doing heavy exercise to burn off the sugar. This diet plan assumes that many of its followers are too heavy or not muscular enough yet to do that kind of strenuous exercise. So if we recommended that you ate a whopping 28g of sugar in a single meal, no matter what nutrition was in that item, we would be dooming you to gaining weight.
So here's the question. Do you exercise an hour every day? If you do, then sweet potatoes would be fine for you - lots of nutrition, lots of sugar for you to use to get through that exercise. You wouldn't lose as much weight compared to eating something low in sugar, but it might be a trade-off you accept. However, for people who don't exercise that heavily, eating high sugar vegetables is going to be counterproductive in losing weight. You're going to gain weight, because you're ingesting a ton of sugar and not burning it off.
The real question is - Why would you eat a sugar-high veggie, when there are other veggies like broccoli that have high nutrition *and* are low in sugar? Because they're sweet? The last thing you want to cultivate in *any* diet is a sweet tooth :)
Lisa Shea's Library of Low Carb Books