# How to apply sampling weights in R

I'm working with a large, national survey that was collected using complex survey methods. In order to make my results representative I need to account for sample weights and other survey design features (e.g., sampling strata). I'm new to this methodology, so apologies if the answers here are obvious.

Some of my models involve only a subset of the data (e.g., only female participants).

I have one questions:

Do I need to adjust the sample weights to reflect the fact that I am only analyzing a subsample (e.g., females)? My understanding is that not adjusting the weights can bias results (the standard errors in particular).

In R, the survey package has methods for calculating mean differences and GLM estimates from complex designs.