8 medium red potatoes, with peel, shredded
1 large sweet onion, minced
3 eggs, lightly beaten
3 tablespoons all-purpose flour
1/2 teaspoon baking powder
1 tablespoon dried rosemary
1 tablespoon salt
2 teaspoons ground black pepper
1 1/2 teaspoons lime juice
2 tablespoons vegetable oil