Question
Preparing your session Launch an RStudio session. Run getwd() in the console to check the directory that you are working out of. Now set the
Preparing your session
Launch an RStudio session.
Run getwd() in the console to check the directory that you are working out of. Now set the directory to a folder that youve created for this class.
Run the following lines of code in the console individually. Observe the output that each provides and which RStudio pane provides this output.
In the Misc Displays window (bottom right) click on the Packages tab. Check out the packages that are already installed on your machine. Does everyone in your group have the same packages installed or do some of you have more than others? (If so that is ok!)
Go to the RStudio toolbar and go to Tools Global Options
Go to General and make sure the line Restore .RData into workspace at startup is unchecked and also make sure Save workspace to .RData on exit is set to Never.
Check out the options in the Code, Appearance, and Pane Layout sections. Personalize your setup as you see fit!
Open a new .R script.
Use the RStudio keyboard shortcut Ctrl + Shift + R to create a section header in your script. An Insert Section dialog box should appear, asking you to input the name of the section headercall it Question 1: BMI and press OK.
Notice the many dashes after the words Session Setup. This section header organizes your code and allows you and others to quickly skim the structure of your code to understand whats happening.
Notice you can collapse the entire section if you want. (Figure out how to do that.)
Next to the Source button in your script toolbar, youll notice an outline button. Click it. What
do you notice? Guess what happens as you create more section headers?
Question 1: BMI
Given the equation for calculating Body Mass Index (BMI) is: BMI = (weight in pounds 703)/(height in inches)^2 Say an individual weighs 150 lbs and is 68 inches tall. What is their BMI?
wt <- ___ ht <- ___
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