You need 23 people to have a 50% chance that two or more of them share the same birthday. Use the quantile function of the birthday distribution to calculate how many people you need to have a 90% chance of a shared birthday (no need to store your result in an object).

(from: Cotton, 2013, Learning R, O’Reilly)