
Foundational and Applied Statistics for Biologists using R Electronic Appendix (Introduction to R) Ken Aho updated 10/16/2019 Foundational and Applied Statistics for Biologists Using R (electronic appendix) INTRODUCTION TO R Ken Aho CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2014 Taylor & Francis Group, LLC Except as permitted under U. S. Copyright Law, no part of this book may be reprinted, reproduced, retransmitted, or uti- lized in any form by any electronic, mechanical, or other means, now known or hereafter invented, included photocopying, microfilming, and recording in any information storage or retrieval system, without written permission from the publishers. Table of contents ii Table of contents iii Table of contents iv Contents 9.5 Exporting graphics ..................................................................................................................................38 16 Logical commands �������������������������������������������������������������������������������������������������������������87 9.6 Typeface families .....................................................................................................................................39 1 Introduction to R ������������������������������������������������������������������������������������������������������������������ 1 16.1 ifelse ...................................................................................................................................................88 ..................................................................................................41 1.1 A very brief history ..................................................................................................................................1 9.7 text, lines, points, paste 16.2 if, else, any, and all ......................................................................................................................88 ................................................................................................................................................42 1.2 The R language .........................................................................................................................................2 9.8 plotmath 17 Simple functions for data management �����������������������������������������������������������������������89 9.9 .........................................................................................................................................................42 1.3 R copyrights and licenses �����������������������������������������������������������������������������������������������������������������������2 axis 17.1 replace ................................................................................................................................................89 9.10 �����������������������������������������������������������������������������������������������������������������������������������������������������43 1.4 R and reliability ........................................................................................................................................2 mtext 17.2 which �����������������������������������������������������������������������������������������������������������������������������������������������������89 9.11 Histograms ............................................................................................................................................46 1.5 Installation ................................................................................................................................................3 17.3 sort .......................................................................................................................................................90 9.12 Subsetting scatterplot arguments using a categorical variable .......................................................48 2 Basics ��������������������������������������������������������������������������������������������������������������������������������������� 4 17.4 rank .......................................................................................................................................................90 9.13 Plotting variables using additional axes ............................................................................................50 2.1 First operations .........................................................................................................................................4 17.5 order �����������������������������������������������������������������������������������������������������������������������������������������������������90 9.14 Barplots ...................................................................................................................................................51 2.2 Use your scroll keys ��������������������������������������������������������������������������������������������������������������������������������5 17.6 unique ...................................................................................................................................................91 9.15 Multivariate line and scatterplots ......................................................................................................55 2.3 Note to self: ...........................................................................................................................................5 17.7 match ...................................................................................................................................................92 # 9.16 Boxplots ...................................................................................................................................................57 2.4 Unfinished commands ............................................................................................................................6 17.8 which and %in% ...................................................................................................................................93 9.17 Interval plots ..........................................................................................................................................58 2.5 Basic options .............................................................................................................................................6 17.9 strsplit and strtrim ....................................................................................................................93 9.18 Three dimensional plots .......................................................................................................................59 2.6 Saving and loading your work ..............................................................................................................7 17.10 Complex pattern matching: gsub, grep, and metacharacters ..................................................94 9.19 Auxiliary graphics packages ................................................................................................................62 3 Getting help in R����������������������������������������������������������������������������������������������������������������� 10 18 Testing and coercing ����������������������������������������������������������������������������������������������������������96 10 Data structures ��������������������������������������������������������������������������������������������������������������������68 3.1 ........................................................................................................................................................10 19 , , and ��������������������������������������������������������������������������������������������������������98 help 10.1 Vectors .....................................................................................................................................................68 NA NaN NULL 3.2 Manuals and additional information ...................................................................................................11 20 Binary numbers, bits and bytes �������������������������������������������������������������������������������������101 10.2 Matrices ...................................................................................................................................................69 4 Expressions and assignments ������������������������������������������������������������������������������������������� 13 20.1 Floating point arithmetic ....................................................................................................................102 10.3 Arrays ......................................................................................................................................................69 4.1 Naming objects ......................................................................................................................................13 20.2 Binary characters .................................................................................................................................103 10.4 Dataframes ..............................................................................................................................................70 4.2 Combining objects with .....................................................................................................................14 c 10.5 Lists ..........................................................................................................................................................71
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages81 Page
-
File Size-