From the "Learn R. By coding." (by Kurnicki) textbook: Chapter 1.3: Exercises: 3, 5, 7 Chapter 2.7: Exercise: 2, 5, 7, 8 Submit your answers with all your R code in a .pdf format (limit your file to 7...

1 answer below »

From the "Learn R. By coding." (by Kurnicki) textbook:



Chapter 1.3: Exercises: 3, 5, 7



Chapter 2.7: Exercise: 2, 5, 7, 8


Submit your answers with all your R code in a .pdf format (limit your file to 7 pages). Write commentary/conclusions for every exercise.


Complete the exercises using the following "answer framework" for each question:



  1. Exercise/question number

  2. R Code / libraries should be included (important chunks are highlighted)

  3. Code output (data frame, vector, chart)

  4. A chart/visual, if needed

  5. Your comment, conclusions and/or insight into the results.


If your code produces errors and you cannot find a fix, try to explain what this error means. Do not ignore errors!




Microsoft Word - Learn R.By coding.docx LearnR.Bycoding. Copyright Titlebook:LearningR.Bycoding. Authorbook:ThomasKurnicki ©2019,ThomasKurnicki Selfpublishing ISBN978-83-952046-1-6 ALLRIGHTSRESERVED.Thisbookcontainsmaterialprotected under International and Federal Copyright Laws and Treaties. Anyunauthorizedreprintoruseofthismaterialisprohibited.No partofthisbookmaybereproducedortransmittedinanyform or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval systemwithout expresswritten permission from the author/publisher Dedicatedto… Students… Andanyoneelsewho understandstheimportanceof data. Table of Contents Preface .......................................................................................... 1 1. R intro: the environment ....................................................... 3 1.1 Short passage about R ................................................ 3 1.2 Installation.................................................................. 4 1.2.1 R Studio installation................................................. 5 1.2.2 Installation verification ............................................ 6 1.2.2 Workflow in the R Studio environment. .................. 6 1.3 Exercises ..................................................................... 9 2. Data objects ............................................................................ 12 2.1 Vectors, matrices, and data frames .......................... 12 2.2 Testing and changing the type of objects.................. 16 2.3 Writing comments in your script .............................. 17 2.4 Sub-setting objects using names and indexes ........... 19 2.5 Importing and exporting data sets ............................ 21 2.6 Cleaning and sub-setting your data .......................... 23 2.7 Exercises ................................................................... 24 3. Functions ................................................................................. 28 3.1 Packages / libraries – installation and usage ............ 28 3.2 Functions from libraries ............................................ 30 3.3 User defined functions ............................................. 35 3.4 Exercises ................................................................... 37 4. Loops ....................................................................................... 40 4.1 The “FOR” loop ......................................................... 42 4.2 The “WHILE” loop ..................................................... 45 4.3 Apply family function ............................................... 47 4.4 Exercises ................................................................... 49 5. If statements ........................................................................... 53 5.1 One possibility if statement ...................................... 53 5.2 Nested if statement .................................................. 54 5.3 Combining an if statement with a for loop ............... 56 5.4 Exercises ................................................................... 57 6. Estimation and optmization .................................................... 60 6.1 Linear regression ..............................................
Answered Same DayJan 25, 2022

Answer To: From the "Learn R. By coding." (by Kurnicki) textbook: Chapter 1.3: Exercises: 3, 5, 7 Chapter 2.7:...

Suraj answered on Jan 26 2022
122 Votes
Solution 1.3:
3)
While running the command ?sd we get the response in the 4th window of the R Stud
io. In this window description about the sd command is explained.
Explanation: sd command is mainly used for calculation of standard deviation. Following is the interpretation about command:
Command: sd(x, na.rm=False)
Here, x is the numeric vector like set of integers. Na.rm is used for whether to neglect of not NA values if they are present in the vector.
5)
While running the command ?plot we get the response in the 4th window of the R Studio. In this window description about...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here