@rugbygirl - They are both nutritional deficiencies. Scurvy is a vitamin C deficiency, so that's why they gave the sailors limes (and then called them "limeys").
I remember reading about pellagra in a book I had when I was a kid. It was so widespread in the South that people (doctors, government officials, etc.) thought that it had to be contagious, especially because it seems to spread through institutions like orphanages and prisons. Proving otherwise was quite a task.
Then once they found the cause of pellagra, they had to find a way to treat it besides healthy food, because orphanages, for instance, just couldn't afford to feed any fresh veggies or meat to all the kids. So they gave them brewers yeast as a supplement. Hard to imagine in this era of abundance!