Any period that you spend outside Canada will delay the date you can apply for citizenship. If you stay in Canada the whole time, you can apply 3 years after becoming PR. If you leave for a year during your first 4 years as a PR, you can apply for citizenship after 4 years as a PR. If you leave for more than a year, you have to start counting to 3 again when you get back. For citizenship, it doesn't matter if you spend time inside/outside Canada in one stretch or in bits and pieces as long as you have 1095+ days in Canada in the previous 4 years before you apply.
The residency requirements to keep your PR are not the same as the ones for citizenship. To keep your PR, you can not be outside Canada more than 1095 days in any 5 year period.