# EARNWT and UHRSWORKORG, UHOURWORK1

**URL:** <https://forum.ipums.org/t/earnwt-and-uhrsworkorg-uhourwork1/3660>\
**Category:** CPS\
**Created:** [July 23, 2020, 4:25pm UTC](https://forum.ipums.org/t/earnwt-and-uhrsworkorg-uhourwork1/3660 "2020-07-23T16:25:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![KariWilliams](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@KariWilliams](https://forum.ipums.org/u/KariWilliams)\
**Post date:** [April 22, 2021, 9:59pm UTC](https://forum.ipums.org/t/earnwt-and-uhrsworkorg-uhourwork1/3660/4 "2021-04-22T21:59:22Z")

</div>

I am not aware of any relevant sample code in R for IPUMS on this specific request and am not an R user. However, I am linking a page with information on [calculating a weighted median in R](https://www.rdocumentation.org/packages/spatstat/versions/1.56-1/topics/weighted.median). It looks to me like your code on [this forum post](https://forum.ipums.org/t/median-hourly-earnings-based-on-earnwt/4097) restricts your data file to waitstaff and first a weighted average hourly wage, then determines the median for the weighted hourly wage.

For general R resources, you might be interested in the R [data training exercises](https://ipums.org/support/exercises) for IPUMS CPS, Quick-R ([https://www.statmethods.net/](https://www.statmethods.net/)), or [R4DS](https://r4ds.had.co.nz/).

---

_[View the full topic](https://forum.ipums.org/t/earnwt-and-uhrsworkorg-uhourwork1/3660)._
