Your understanding of how to weight pooled Basic Monthly samples (using WTFINL/# of samples) and Outgoing Rotation Group (Earner Study) samples (using EARNWT/# of samples) is correct. An analysis in which Earner Study variables are linked to Basic Monthly variables for a subset of observations using CPSIDP should be weighted using EARNWT. More resources on Linking the CPS are available here.
As for your question about how to implement weights in R, you might find some of the example code provided on these exercises helpful (specifically the ones written for CPS which utilize R). The CPS microdata does not include any sample design variables (STRATA or PSU) that are needed for variance estimation (the source that you linked to is for IPUMS USA data, not IPUMS CPS), though survey and srvyr packages can be used to analyze replicate weights. This forum post provides syntax for using these packages in R, though I don’t believe you will be able to use replicate weights because they are only available for ASEC and some supplement files; they are not available in the basic monthly samples.