Question
Objectives of this question (related to R applications as shown in the tutorials). By completing this question, you are showing your ability to: - Entering
Objectives of this question (related to R applications as shown in the tutorials). By completing this question, you are showing your ability to: - Entering in small data sets using the c function in R. This function combines, or concatenates terms together. - Applying built-in functions in R. - Using bar plots in particular histograms. Data to work with: Suppose, for example, we have a sample of 30 tax accountants from all the states and territories of Australia and their individual state of origin is specified by a character vector of state mnemonics as > state <- c ("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa", "qld", "vic", "nsw", "vic", "qld", "qld", "sa", "tas", "sa", "nt", "wa", "vic", "qld", "nsw", "nsw", "wa", "sa", "act", "nsw", "vic", "vic", "act") Suppose we have the incomes of the same tax accountants in another vector (in suitably large units of money) > incomes <- c (60, 49, 40, 61, 64, 60, 59, 54, 62, 69, 70, 42, 56, 61, 61, 61, 58, 51, 48, 65, 49, 49, 41, 48, 52, 46, 59, 46, 58, 43) 1) Use R functions to compute the mean, median, variance and standard deviation of the tax accountants. Store each result in a new variable and print the value of each of the variables. 2) Use R functions to create a plot that shows the frequency distribution of the income vector. Save the generated plot as an image. Note: There are eight states and territories in Australia, namely: the Australian Capital Territory (act), New South Wales (nsw), the Northern Territory (nt), Queensland (qld), South Australia (sa), Tasmania (tas), Victoria (vic), and Western Australia (wa)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started