R software

9860 palavras 40 páginas
The R Inferno
Patrick Burns1 30th April 2011

1 This document resides in the tutorial section of http://www.burns-stat.com. More elementary material on R may also be found there. S+ is a registered trademark of TIBCO Software Inc. The author thanks D. Alighieri for useful comments.

Contents
Contents List of Figures List of Tables 1 Falling into the Floating Point Trap 2 Growing Objects 1 6 7 9 12

3 Failing to Vectorize 17 3.1 Subscripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2 Vectorized if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.3 Vectorization impossible . . . . . . . . . . . . . . . . . . . . . . . 22 4 Over-Vectorizing 5 Not 5.1 5.2 5.3 24

Writing Functions 27 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Simplicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 38 39 39 40 40 40 41 42 42

6 Doing Global Assignments 7 Tripping on Object Orientation 7.1 S3 methods . . . . . . . . . . . 7.1.1 generic functions . . . . 7.1.2 methods . . . . . . . . . 7.1.3 inheritance . . . . . . . 7.2 S4 methods . . . . . . . . . . . 7.2.1 multiple dispatch . . . . 7.2.2 S4 structure . . . . . . . 7.2.3 discussion . . . . . . . . 7.3 Namespaces . . . . . . . . . . .

1

CONTENTS 8 Believing It Does as Intended 8.1 Ghosts . . . . . . . . . . . . . . . . . . . . . . 8.1.1 differences with S+ . . . . . . . . . . . 8.1.2 package functionality . . . . . . . . . . 8.1.3 precedence . . . . . . . . . . . . . . . 8.1.4 equality of missing values . . . . .

Relacionados

  • middleware
    1936 palavras | 8 páginas
  • Cmm - capability maturity model
    998 palavras | 4 páginas
  • Qualidade de software
    5506 palavras | 23 páginas
  • Questionário de Engenharia de Software
    1726 palavras | 7 páginas
  • auqi o vem
    10678 palavras | 43 páginas
  • engenharia de requisitos
    1188 palavras | 5 páginas
  • Loja virtual
    679 palavras | 3 páginas
  • Processo de Software
    1402 palavras | 6 páginas
  • ListaExercicio
    689 palavras | 3 páginas
  • Introdução ao Linux
    1162 palavras | 5 páginas