1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Beginning R pptx

507 320 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 507
Dung lượng 18,88 MB

Nội dung

www.it-ebooks.info www.it-ebooks.info BEGINNING R INTRODUCTION xxi CHAP TE R 1 Introducing R: What It Is and How to Get It 1 CHAPTER 2 Starting Out: Becoming Familiar with R 25 CHAPTER 3 Starting Out: Working With Objects 65 CHAPTER 4 Data: Descriptive Statistics andTabulation 107 CHAPTER 5 Data: Distribution 151 CHAPTER 6 Simple Hypothesis Testing 181 CHAPTER 7 Introduction to Graphical Analysis 215 CHAPTER 8 Formula Notation and Complex Statistics 263 CHAPTER 9 Manipulating Data and Extracting Components 295 CHAPTER 10 Regression (Linear Modeling) 327 CHAPTER 11 More About Graphs 363 CHAPTER 12 Writing Your Own Scripts: Beginning to Program 415 APPENDIX Answers to Exercises 433 INDEX 461 www.it-ebooks.info www.it-ebooks.info BEGINNING R THE STATISTICAL PROGRAMMING LANGUAGE www.it-ebooks.info www.it-ebooks.info BEGINNING R THE STATISTICAL PROGRAMMING LANGUAGE Mark Gardener www.it-ebooks.info Beginning R: The Statistical Programming Language Published by John Wiley & Sons, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-16430-3 ISBN: 978-1-118-22616-2 (ebk) ISBN: 978-1-118-23937-7 (ebk) ISBN: 978-1-118-26412-6 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport .wiley.com . For more information about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2012937909 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book. www.it-ebooks.info It is much easier to be critical than to be correct. — Benjamin Disraeli www.it-ebooks.info EXECUTIVE EDITOR Carol Long PROJECT EDITOR Victoria Swider TECHNICAL EDITOR Richard Rowe PRODUCTION EDITOR Kathleen Wisor COPY EDITOR Kim Cofer EDITORIAL MANAGER Mary Beth Wakefield FREELANCER EDITORIAL MANAGER Rosemarie Graham ASSOCIATE DIRECTOR OF MARKETING David Mayhew MARKETING MANAGER Ashley Zurcher BUSINESS MANAGER Amy Knies PRODUCTION MANAGER Tim Tate VICE PRESIDENT AND EXECUTIVE GROUP PUBLISHER Richard Swadley VICE PRESIDENT AND EXECUTIVE PUBLISHER Neil Edde ASSOCIATE PUBLISHER Jim Minatel PROJECT COORDINATOR, COVER Katie Crocker COMPOSITOR Craig Woods, Happenstance Type-O-Rama PROOFREADER James Saturnio, Word One INDEXER John Sleeva COVER DESIGNER LeAndra Young COVER IMAGE © iStock / Mark Wragg CREDITS www.it-ebooks.info [...]... Hang of R 1 2 The R Website Downloading and Installing R from CRAN Installing R on Your Windows Computer Installing R on Your Macintosh Computer Installing R on Your Linux Computer Running the R Program Finding Your Way with R 3 3 4 7 7 8 10 Getting Help via the CRAN Website and the Internet The Help Command in R Help for Windows Users Help for Macintosh Users Help for Linux Users Help For All Users Anatomy... recent versions of R The R program does change from time to time as new versions are released However, most of the commands you will need to know have not changed, and even older (in computer terms) versions will work quite happily How This Book Is Structured The book has a general progressive character, and later chapters tend to build on skills you learned earlier Therefore if you are a beginner, you... you will probably find it most useful to start at the beginning and work your way through in a progressive manner If you are a more seasoned user, you may want to use selected chapters as reference material, to refresh your skills No approach to learning R is universally adequate, but I have tried to provide the most logical path possible For example, learning to produce graphics is very important, but... software) and documentation (e.g manuals, FAQs) When you perform searches for R- related topics on the internet, adding CRAN (or R) to your search terms increases your results To get started downloading R, you’ll want to perform the following steps: 1 Visit the main R web page (www .r- project.org); you see a Getting Started box with a link to download R (see Figure 1-2) Click that link and you are directed... done you will have R installed Versions of Windows post XP require some of additional steps to make R work properly For Vista or later you need to alter the properties of the R program so that it runs with Administrator privileges To do so, follow these steps: 1 2 3 4 Click the Windows button (this used to be labeled Start) Select Programs Choose the R folder Right-click the R program icon to see an... Charts 229 232 Line Charts Using Numeric Data Line Charts Using Categorical Data Pie Charts Cleveland Dot Charts Bar Charts 232 233 236 239 245 Single-Category Bar Charts Multiple Category Bar Charts Stacked Bar Charts Grouped Bar Charts Horizontal Bars Bar Charts from Summary Data Copy Graphics to Other Applications 245 250 250 250 253 253 256 Use Copy/Paste to Copy Graphs 257 Save a Graphic to Disk 257... superscript and subscript text and mathematical symbols You learn how to add legends to plots, and how to add error bars to bar charts or scatter plots Finally, you learn how to export graphs to disk as high-quality graphics files, suitable for publication Chapter 12: Writing Your Own Scripts: Beginning to Program—In this chapter you learn how to start producing customized functions and simple scripts... hard-working, international team of volunteer developers The R project webpage is the main site for information on R At this site are directions for obtaining the software, accompanying packages, and other sources of documentation www.it-ebooks.info 2 ❘ chapteR 1 IntroducIng r: What It Is and hoW to get It R is a powerful statistical program but it is first and foremost a programming language Many routines... (Linear Modeling)—This chapter is all about regression It builds on earlier chapters and covers various aspects of this important analytical method You learn how to carry out basic regression, as well as complex model building and curvilinear regression It is also important because it illustrates some useful aspects of R (for example, how to dissect results) The later parts of the chapter deal with graphical... to select a local CRAN mirror site from which to download R Figure 1-2 www.it-ebooks.info 4  ❘  CHAPTER 1  Introducing R: What It Is and How to Get It 2 3 The starting page of the CRAN website appears once you have selected your preferred mirror site This page has a Software section on the left with several links Choose the R Binaries link to install R on your computer (see Figure 1-3) You can also . www.wiley.com. Library of Congress Control Number: 2012937909 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress. EDITOR Carol Long PROJECT EDITOR Victoria Swider TECHNICAL EDITOR Richard Rowe PRODUCTION EDITOR Kathleen Wisor COPY EDITOR Kim Cofer EDITORIAL MANAGER Mary

Ngày đăng: 17/02/2014, 23:20

w