Probability with R. Jane M. Horgan. Читать онлайн. Newlib. NEWLIB.NET

Автор: Jane M. Horgan
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Математика
Год издания: 0
isbn: 9781119536987
Скачать книгу
ongoing assistance with the tracking down of material, relevant articles, and books.

      A special word of thanks to my technical advisors: Systems analyst Rosaleen McGrath provided invaluable advice and help with file management. Jim Doyle and Eugene Curran continued to ensure that I had the best hardware and best software. Mathematician Robin Harte checked the mathematical derivations in the appendices and helped with the final edit.

      As teachers, we should always remember that not only do we teach but also we are taught. Throughout my working life, I have been privileged to work with students, both in Ireland and abroad, who never ceased to inspire me. I am indebted to all who took this course over the years, and provided invaluable comments and constructive suggestions. I also appreciate the feedback from instructors who used the original version of the book, as well as those who reviewed it. Thank you to those who sent me words of appreciation, alerted me to errata and made useful suggestions. I hope you will continue to do so. My email address is

      [email protected]

      Thanks to my colleague and neighbor Margaret Byrne for her ongoing catchphrase “will that book of yours ever get finished?”; to all my friends in Kuşadası for putting up with me; apologies for those cancelled Turkish classes, missed appointments, lunch dates, and nights out.

      Finally, let me thank my gambling trio. Jane, the former princess, is now a queen of hearts, Amy, once a pirate, is now the club ace, and the precious diamond Ava, not around in time for the first edition, is the youngest member of the club, and a force to be reckoned with.

      Jane M. Horgan

       2019

      This book is accompanied by a companion website:

       www.wiley.com/go/Horgan/probabilitywithr2e

      The website includes the following materials:

       the data file in electronic form;

       solutions to selected exercises for students;

       full set of solutions for instructors.

Part I The R Language

      It is not the intention to provide a complete set of features of the language, but rather to give a flavor of the structure of R and how to get help to proceed further. Additional features are introduced in later chapters as the need for them arises.

      R is a data‐analysis system, a sophisticated calculator and an object‐oriented programming language. It provides an environment for statistical analysis and graphics that differs from standard statistical packages such as SPSS and Minitab; these provide point‐and‐click graphical‐user interfaces (GUIs), while R is command‐driven. Users type commands at a prompt, and the R interpreter responds.

      It is possible to get quite far using R to execute simple expressions from the command line, and some users may never need to go beyond this. At a more advanced level, users write their own functions, either to systematize repetitive work or to develop add‐on packages for new functionality.

       Go to the CRAN website at http://cran.r-project.org/;

       Choose an operating system from Linux, (Mac) OS X, and Windows appropriate to your computer. In this book, we work in the Windows environment, click “Download R for Windows”;

       Choose the “base” package;

       Click “Download R 3.6.1”, which is the current version at the time of writing.

       Press the option “Run.”

      R is now installed, and you should see an “R” icon on your computer. Clicking on this will start up the standard R package.

      R documentation is available at http://cran.r-project.org/manuals, where you will find the following manuals:

       An Introduction to R gives an introduction to the language and how to use R for doing statistical analysis and graphics;

       The R Language Definition documents the language per se, that is, the objects that it works on, and the details of the expression evaluation process, which are useful to know when programming R functions;

       Writing R Extensions covers how to create your own packages, how to write R help files, and the foreign language (C, C++, Fortran, etc.) interfaces;

       R Data Import/Export describes the import and export facilities available either in R itself or via packages that are available from CRAN;

       R Installation and Administration;

       R Internals is a guide to the internal structures of R and coding standards for the core team working on R itself;

       The R Reference Index contains all help files of the R standard and recommended packages in printable form.

      The documentation may be downloaded or browsed. We suggest that you download and obtain a hard copy of An Introduction to R by Venables et al. (2019) Version 3.6.1 (2019-07-05) and access the others as you require.

      To start, either click on the R icon (if you have created a short cut on your screen) or go to “Programs,” select R, and then click on the R icon. When the R program is started, and after it prints an introductory message on the screen, the interpreter prompts for input with the command prompt “

.”

      Expressions that are typed at the command prompt are evaluated and printed. For example,

      6+7*3/2

      returns

      [1] 16.5

      To assign or store data, write

      x <- 1:4

      Here, the integers 1, 2, 3, 4 are assigned to the vector

. To check the contents of Скачать книгу