Lab 1F
Directions: Follow along with the slides and answer the questions in red font in your journal.
caseid
: Anonymous ID of survey taker.V1
: The age of the respondent.V2
: The gender of the respondent.V3
: Whether the person is employed full-time or part-time.V4
: Whether the person has a physical difficulty.V5
: How long the person sleeps, in minutes.V6
: How long the survey taker spent on homework, in minutes.V7
: How long the respondent spent socializing, in minutes.rename
function:atu_dirty
.
Yes/No
variables as "1"
/"0"
.str
ucture of your data and the variable descriptions from a few slides back:
as.numeric
function.
## [1] 3.14
"3.14"
, but as.numeric
was able to turn it back into a number.gender
variable uses "01"
and "02"
for "Male"
and "Female"
, respectively."Male"
and "Female"
.gender
and their counts type:01
’ means ‘Male
’ and ‘02
’ means ‘Female
’ then we can use the following code to recode the levels of gender.atu_cleaner
…gender
variable’s levels …"01"
will now be "Male"
…"02"
will now be "Female"
."01"
: Person surveyed did not have a physical challenge."02"
: Person surveyed did have a physical challenge.atu_dirty
data setView
your data to make sure it looks clean and tidy before saving.