jagomart
digital resources
picture1_00 Solutionsexercises


 143x       Filetype PDF       File size 1.52 MB       Source: www.westernsydney.edu.au


File: 00 Solutionsexercises
alearningguidetor solutions to exercises august contents basics of r exercises calculating simpleobjects working with a single vector scripts to quote or not to quote working with two vectors alphabet aerobics ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
                      ALearningGuidetoR
                       Solutions to Exercises
                          August‚‰,‚€‰
                    Contents
                       Basics of R                                                                                                                 ƒ
                        .… Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ƒ
                               .….  Calculating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ƒ
                               .….‚  Simpleobjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        „
                               .….ƒ Working with a single vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            …
                               .….„ Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     …
                               .….… To quote or not to quote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          †
                               .….† Working with two vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            ‡
                               .….‡ Alphabet aerobics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         ˆ
                               .….ˆ Comparingandcombiningvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                    ‰
                               .….‰ “nto the matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      €
                               .….€ Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     ‚
                               .…. Save your work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ƒ
                    ‚ Generating,readingandextractingdata                                                                                          „
                        ‚.†    Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   „
                               ‚.†.   Workingwithasinglevector‚ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               „
                               ‚.†.‚   Alphabetaerobics‚ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         …
                               ‚.†.ƒ   Basic operations with the Cereal data . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             …
                               ‚.†.„   Ashortdataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       ˆ
                               ‚.†.…   Titanic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ‰
                               ‚.†.†   Managingyourworkspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .               ‚€
                    ƒ Specialdatatypes                                                                                                             ‚
                        ƒ.‰ Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       ‚
                               ƒ.‰.   Titanic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    ‚
                               ƒ.‰.‚   Hydrodam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        ‚ƒ
                               ƒ.‰.ƒ   HFEtreemeasurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .             ‚…
                               ƒ.‰.„   Flux data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ‚†
                               ƒ.‰.…   AlphabetAerobicsƒ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         ‚‡
                               ƒ.‰.†   DNAAerobics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       ‚ˆ
                    „ Visualizingdata                                                                                                              ‚‰
                        „.‰ Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ‚‰
                               „.‰.   Scatter plot with the pupae data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          ‚‰
                               „.‰.‚   Flux data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   ƒ‡
                               „.‰.ƒ   Hydrodam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        „€
                               „.‰.„   Colouredscatter plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        „„
                               „.‰.…   Superimposedhistograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              „‡
                               „.‰.†   Trellis graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    „ˆ
                    … Basicstatistics                                                                                                              …€
                                                                                    
                        ….‡ Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      …€
                               ….‡.   Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   …€
                               ….‡.‚   Univariate distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        …
                               ….‡.ƒ   Moret-tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     …ƒ
                               ….‡.„   Simplelinear regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .         ……
                               ….‡.…   Quantile Quest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      †
                    † Summarizing,tabulatingandmergingdata                                                                                         †‡
                        †.… Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      †‡
                               †.….   Summarizingthecerealdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              †‡
                               †.….‚   Wordsandtheweather . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .              †‰
                               †.….ƒ   Mergenewdataontothepupaedata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ‡€
                               †.….„   Mergingmultipledatasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .           ‡
                               †.….…   Orderedboxplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        ‡‚
                               †.….†   Variances in the “ x F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ‡…
                               †.….‡   Weightloss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ‡†
                    ‡ Linearmodelling                                                                                                              ˆ€
                        ‡.‡ Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ˆ€
                               ‡.‡.   One-wayANOVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          ˆ€
                               ‡.‡.‚   Two-wayANOVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .          ˆ
                               ‡.‡.ƒ   Multiple regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       ˆ…
                               ‡.‡.„   Linear Model with factor and numeric variables . . . . . . . . . . . . . . . . . . . . . . . ˆ‡
                               ‡.‡.…   Logistic regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .     ‰
                               ‡.‡.†   Generalized linear model (GLM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .            ‰‚
                    ˆ Functions,listsandloops                                                                                                      ‰…
                        ˆ.† Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .      ‰…
                               ˆ.†.   Writing functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       ‰…
                               ˆ.†.‚   Workingwithlists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .        ‰‡
                               ˆ.†.ƒ   Usingfunctions to make manyplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . €‚
                               ˆ.†.„   Monthlyweatherplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . €ƒ
                               ˆ.†.…   TheCentrallimit theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . €…
                                                                                    ‚
           Chapter1
           Basics of R
           1.15    Exercises
           “n these exercises, we use the following colour codes:
               ∎ Easy: make sure you complete some of these before moving on. These exercises will follow
               examplesinthetextveryclosely.
               Ɠntermediate: a bit harder. You will often have to combine functions to solve the exercise in
               twosteps.
               ▲Hard: difficult exercises! These exercises will require multiple steps, and significant departure
               fromexamplesinthetext.
           Wesuggestyoucompletetheseexercises in an R markdown file. This will allow you to combine code
           chunks, graphical output, and written answers in a single, easy-to-read file.
           1.15.1  Calculating
           Calculate the following quantities:
             . ∎ The sum of 100.1, 234.9 and 12.01
               100.1 + 234.9 + 12.01
               ## [1] 347.01
             ‚. ∎ The square root of 256
               sqrt(256)
               ## [1] 16
             ƒ. ∎ Calculate the €-based logarithm of 100, and multiply the result with the cosine of π. Hint: see
               ?logand?pi.
               log10(100)*cos(pi)
               ## [1] -2
             „. ∎ Calculate the cumulative sum (’running total’) of the numbers ‚,ƒ,„,…,†.
                                              ƒ
The words contained in this file might help you see if this file matches what you are looking for:

...Alearningguidetor solutions to exercises august contents basics of r calculating simpleobjects working with a single vector scripts quote or not two vectors alphabet aerobics comparingandcombiningvectors nto the matrix packages save your work generating readingandextractingdata workingwithasinglevector alphabetaerobics basic operations cereal data ashortdataset titanic managingyourworkspace specialdatatypes hydrodam hfetreemeasurements flux dnaaerobics visualizingdata scatter plot pupae colouredscatter superimposedhistograms trellis graphics basicstatistics probabilities univariate distributions moret tests simplelinear regression quantile quest summarizing tabulatingandmergingdata summarizingthecerealdata wordsandtheweather mergenewdataontothepupaedata mergingmultipledatasets orderedboxplot variances in x f weightloss linearmodelling one wayanova multiple linear model factor and numeric variables logistic generalized glm functions listsandloops...

no reviews yet
Please Login to review.