# Investigate and clean the data set sample.trial # Use the function, str( ) to list:   # the class of sample.trial # the number of observations and variables # the variable names and types # The variables gender and treatment should be factors  # (categorical variables). If these variables are not factors, # please change both variables to factors. # Use the str() function to check that the changes have been # made correctly. # List the first 11 lines of the data set # Summarize the data set using summary( ) ?summary() # Convert the numeric variable age into the factor age.groups # using the function cut( ) and the following  # breaks:  17, 25, 39, 60 # Assign the new variable, age.groups, to the data frame, sample.trial # NOTE:   Review Lecture 6 Class Notes -  #         Converting continuous variables to categorical variables ?cut() # Check:  Print the first 11 observations # Create a subset of males only and assign this subset to the # object, males ?subset() # Use the object males to create a frequency table for the # variable, age.group

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.10CP
icon
Related questions
Question
age gender treatment
26 F A
32 F B
18 M B
29 F A
35 F B
35 M A
38 F B
55 M B
56 M A
34 F A
22 M A
22 F A
23 F B
35 F B
34 F A
22 F B
34 M B
56 F A
59 F B
29 M A
45 F A
43 F B
33 F B
23 M A
49 F A
51 F A
23 F B
38 F A
34 M B
19 F A
39 F B
40 M B

# Investigate and clean the data set sample.trial # Use the function, str( ) to list:   # the class of sample.trial # the number of observations and variables # the variable names and types # The variables gender and treatment should be factors  # (categorical variables). If these variables are not factors, # please change both variables to factors. # Use the str() function to check that the changes have been # made correctly. # List the first 11 lines of the data set # Summarize the data set using summary( ) ?summary() # Convert the numeric variable age into the factor age.groups # using the function cut( ) and the following  # breaks:  17, 25, 39, 60 # Assign the new variable, age.groups, to the data frame, sample.trial # NOTE:   Review Lecture 6 Class Notes -  #         Converting continuous variables to categorical variables ?cut() # Check:  Print the first 11 observations # Create a subset of males only and assign this subset to the # object, males ?subset() # Use the object males to create a frequency table for the # variable, age.group  

Expert Solution
Step 1

To investigate and clean the data set sample.trial, we can follow these steps:

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Introduction to Template
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT