Thông tin tài liệu
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 andTabulation 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
[...]... easily locate it in the download file Once at the site, simply locate the book’s title (either by using the Search box or by using one of the title lists) and click the Download Code link on the book’s detail page to obtain all the source code for the book xxv www.it-ebooks.info introduction There will only be one file to download and it is called Beginning. RData This one file contains all the example datasets... Throughout the text, the use of these commands is illustrated, which is indeed the point of the book Where a command is illustrated in its basic form, you will see a fixed width font to mimic the R display like so: help.start() When the use of a particular command is illustrated, you will see the user-typed input illustrated by beginning the lines with the > character, which mimics the cursor line in the. .. an introductory book such as this Rather, the aim is to become familiar with the language of R and to carry out some of the more commonly used statistical methods In this way, you can strike out on your own and explore the full potential of R for yourself So, the focus is on the operation of R itself Along the way you learn how to carry out a range of commonly used statistical methods, including analysis... symbol represent the output from R (but look out for typed lines that are long and spread over more than one line), so in the following example the first line was typed by the user and the second line is the result: > data1 [1] 3 5 7 5 3 2 6 8 5 6 9 xxiv www.it-ebooks.info introduction tRy it out The Try It Out is an exercise you should work through, following the text in the book 1 2 3 They usually... is a computer program and statistical programming language/ environment It allows a wide range of analytical methods to be used and produces presentation-quality graphics This book covers the language of R, and leads you toward a better understanding of how to get R to do the things you need There is less emphasis on the actual statistical tests; indeed, R is so flexible that the list of tests www.it-ebooks.info... scripts you need for the whole book Once you have the file on your computer you can load it into R by one of several methods: ➤➤ For Windows or Mac you can drag the Beginning. RData file icon onto the R program icon; this will open R if it is not already running and load the data If R is already open, the data will be appended to anything you already have in R; otherwise only the data in the file will be... don’t spot “your” error on the Book Errata page, go to www.wrox.com/contact/techsupport shtml and complete the form there to send us the error you have found We’ll check the information and, if appropriate, post a message to the book’s errata page and fix the problem in subsequent editions of the book p2p wRox com For author and peer discussion, join the P2P forums at p2p.wrox.com The forums are a web-based... another you can take your work with you R handles complex statistical approaches as easily as more simple ones Therefore once you know the basics of the R language, you can tackle complex analyses as easily as simple ones (as usual it is the interpretation of results that can be the really hard bit) getting the hang oF R R is unlike most current computer programs in that you must type commands into the. .. help you get the most from the text and keep track of what’s happening, we’ve used a number of conventions throughout the book The commands you need to type into R and the output you get from R are shown in a monospace font Each example that shows lines that are typed by the user begins with the > symbol, which mimics the R cursor like so: > help() Lines that begin with something other than the > symbol... Getting the Hang of R ❘ 3 Lines of text resulting from your actions are shown without the cursor character, once again mimicking the output that you would see from R itself: > data1 [1] 3 5 7 5 3 2 6 8 5 6 9 So, in the preceding example the first line was typed by the user and resulted in the output shown in the second line Keep these conventions in mind as you are reading this chapter and they will . 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. 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
Ngày đăng: 16/03/2014, 00:20
Xem thêm: Beginning R: The Statistical Programming Language docx, Beginning R: The Statistical Programming Language docx