Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An R Starter Statistics and Data Analysis last updated 2021 -1 2-28 INTRODUCTION This course will use R and RStudio to analyze real world sets

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
An R Starter Statistics and Data Analysis last updated 2021 -1 2-28 INTRODUCTION This course will use R and RStudio to analyze \"real world\" sets of dataso there will NOT be much in the way of hand calculations. This mini-Lab has two objectives: - introduce you to R and RStudio and some simple operations on data. and - check your connection to the RStudio servers to make sure they work. SET-UP Log in to an RStudio server. either Server 1. Server 2 or the campus VDI. Then prepare to do some simple programming: . Make a folder for your stuff. In the lower right-hand pane, click Files, then click New Folder. Name the folder FIStarter; this is where you'll save the script you're about to write. Please Enter lite new folder name RSIaner [I]- . Open an empty R script. At the top menu bar, click File > New File > R script; an editing window should open with a tab showing the distinctive title Untitled1. Now you're ready. R RStudio Pro X + -cn A https://cobrs1.cob.utsa.edu/s/a4199cfc78a31efd46592/ UTSA myUTSA | UTSA | Univ.. Sign In & https://cobrs1.cob.uts... vpn.utsa.edu/? Q Lumen OHM & Wealth Manag File Edit Code View Plots Session Build Debug Profile Tools Help R New File R Script Ctrl+Shift+N Console OR New Project... R R Notebook -/STAI Open File... Ctri+ . R Markdown... Recent Files R Shiny Web App... Open Project... Plumber API... Recent Projects Text File Import Dataset CPP C+ + File Save Ctrl+9 ~] Python Script Save As... SQL Script Save All Ctri+Alt+ 5 Stan File Print... D3 Script Close Ctrl+V R Sweave Close All Ctrl+Shift+W R HTML Close All Except Current Ctri+Shift+Alt+W R Presentation R Documentation Close Project Quit Session. DATA There are several ways to get data into an R program. You can use a "canned" data set from one of the R packages (use the data() function to see what's here read data from a text file with the read.table() function; this can also be used to read from within a R script (which we'll do) read data from a text file with a known URL using the read.table() function (w-a-a-y cool) . read data from an Excel worksheet page using the readxl::read_excel() function build up a data frame within an R script Our Data For this exercise, you'll read the data from within your R script: # copy this into your script XYdata Save As...; save the script in the RStarter folder, with the name RStarter.R. A https://cobrs1.cob.utsa.edu/s/a4 199cfc78a3 1 efd46592/ myUTSA | UTSA | Univ.. Sign In B https://cobrs1.cob.uts.. vpn.utsa.edu/? @ Lumen OHM & Wealth Management.. @ YouTube @ Citrix Receiver @ Friends of CLO Websi R File Edit Code View Plots Session Bu Build Debug Profile Tools Help 0 . .48 0 Go to file/ function | 88 - Addins - RStarter.R* x |Environ HOsource on Save | Q - -Run | | Source - XYdata sample > RStarter ... 50 110 8 63 138 Files Ne 9 42 90 10 30 60 11 5 10 12 55 100 13 14 15 head (XYdata) New Folder Save Cancel 15:13 ( Top Level) : SOME STATISTICS Numerical SummariesThe mean and standard deviation are two commonly used statistics for measurement data. Calculate them for the x and y variables in the data frame. First try these functions in the in the Console window at the lower left-hand side. mean (X ) sd (Y ) The odds-on bet is that these didn't work. Why? The variables x AND Y exist inside the data frame XYdata (think of it as a closed box.) To "see" these variables, you need to prefix their names with the name of the data frame, like this # try these in the Console pane mean (XYdata$x) sd (XYdata$Y) Now calculate and display the statistics like the Big KiDz do, with descriptive labels: # copy this into your script statsnames Select All, then Run > Run All). You should see the numerical statistics in the Console window on the lower left, and the plot in the Plots window on the lower right. Take a screenshot of your entire RStudio window. Submit it via Blackboard, either as a graphics file or as a PDF. REFERENCES Ott, R. Lyman, and Michael T. Longnecker. 2004. A First Course in Statistical Methods. Belmont CA: Brooks-Cole

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Economics for Managers

Authors: Paul G. Farnham

3rd edition

132773708, 978-0133561128, 133561127, 978-0132773706

Students also viewed these Mathematics questions