Assignment Instructions: Exploring Hospital Cost Data in R and RStudio
Objective
This assignment will guide you through installing R and RStudio, importing a healthcare dataset, and performing basic data analysis. You will identify key elements of the RStudio interface, run descriptive statistics, and generate simple visualizations. Submission of screenshots must be from R and RStudio. Copy/pasted results without evidence of being created by the user in R will not be accepted.
Step-by-Step Completion Guide
Step 1: Install R and RStudio
• Download and install R. (Instructions found in Blackboard, Units/Start Here/Download Student Resources)
• Download and install RStudio.
• Open RStudio to ensure the installation is successful. (Having problems, FAQs found in Start Here folder)
Step 2: Import the Unit 4 Sample Data into RStudio
• Load the dataset into RStudio.
• This sample data set contains the Cost per day of hospital ownership categories for 7 states.
• Display the first few rows to confirm the data has been successfully imported.
Step 3: Identify Input and Output on the RStudio Interface
• Take a screenshot of RStudio showing:
• Imported dataset (Environment tab)
• Scripting window (where code is written)
• Console (where results appear)
• Saved objects (Environment tab)
Step 4: Perform Descriptive Statistics in R
• Execute the following tasks and take a screenshot of both the commands and the results:
• List all hospital locations
• Calculate the mean cost per day of State/Local Government Hospitals
• Find the minimum cost per day of Non-Profit Hospitals
• Find the maximum cost per day of For-Profit Hospitals
Step 5: Generate Basic Graphs in R
• Create the following visualizations and take screenshots of the code and output:
• Histogram of Cost per Day for State/Local Government Hospitals
• Boxplot of Cost per Day for For-Profit Hospitals
Submission Requirements
Your submission should include the following:
- Screenshot of RStudio interface (showing imported dataset, script, console, and environment tab). (Step 3)
- Screenshot of descriptive statistics commands and results from R (Step 4).
- Screenshot of code and generated graphs from R (Step 5).
Tips for Success
• Use the Snipping Tool (Windows) or Screenshot feature (Mac) to capture images.
• Check your code for errors before running.
• Save your work frequently in RStudio.
• Review the rubric to ensure all requirements are met.
Good luck, and enjoy working with R and RStudio!
Do you need help with this assignment or any other? We got you! Place your order and leave the rest to our experts.
