Muutke küpsiste eelistusi

E-raamat: R and MATLAB [Taylor & Francis e-raamat]

  • Formaat: 233 pages, 13 Tables, black and white; 10 Illustrations, black and white
  • Sari: Chapman & Hall/CRC The R Series
  • Ilmumisaeg: 02-Jun-2015
  • Kirjastus: CRC Press Inc
  • ISBN-13: 9781315373379
Teised raamatud teemal:
  • Taylor & Francis e-raamat
  • Hind: 115,40 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Tavahind: 164,86 €
  • Säästad 30%
  • Formaat: 233 pages, 13 Tables, black and white; 10 Illustrations, black and white
  • Sari: Chapman & Hall/CRC The R Series
  • Ilmumisaeg: 02-Jun-2015
  • Kirjastus: CRC Press Inc
  • ISBN-13: 9781315373379
Teised raamatud teemal:

The First Book to Explain How a User of R or MATLAB Can Benefit from the Other

In today’s increasingly interdisciplinary world, R and MATLAB® users from different backgrounds must often work together and share code.R and MATLAB® is designed for users who already know R or MATLAB and now need to learn the other platform. The book makes the transition from one platform to the other as quick and painless as possible.

Enables R and MATLAB Users to Easily Collaborate and Share Code

The author covers essential tasks, such as working with matrices and vectors, writing functions and other programming concepts, graphics, numerical computing, and file input/output. He highlights important differences between the two platforms and explores common mistakes that are easy to make when transitioning from one platform to the other.

List of Figures xiii
List of Tables xv
Preface xvii
About the Author xxi
1 Installing and Running R and MATLAB 1(8)
1.1 Obtaining and installing
1(3)
1.2 Commands for getting help
4(2)
1.3 Demos
6(1)
1.4 Quitting
6(1)
1.5 Additional resources
6(3)
2 Getting Started: Variables and Basic Computations 9(10)
2.1 Variable names
9(1)
2.2 Assignment statements
10(1)
2.3 Basic computations
11(3)
2.4 Formatting of output
14(1)
2.5 Other computations
15(1)
2.6 Complex numbers
16(1)
2.7 Strange variable names in R
16(1)
2.8 Data types
17(2)
2.8.1 R
17(1)
2.8.2 MATLAB
18(1)
3 Matrices and Vectors 19(22)
3.1 Overview
19(1)
3.2 Creating vectors
19(3)
3.3 Working with vectors
22(3)
3.4 Creating matrices
25(2)
3.5 Working with matrices
27(4)
3.6 Reshaping matrices, and higher-dimensional arrays
31(2)
3.7 Sparse matrices
33(1)
3.8 Names with vectors and matrices/arrays
33(6)
3.8.1 R: names for vector/matrix elements and matrix rows/columns
33(2)
3.8.2 R data frames
35(2)
3.8.3 MATLAB structs
37(2)
3.9 Miscellaneous
39(2)
4 Matrix/Vector Calculations and Functions 41(14)
4.1 Applying a function to rows or columns of a matrix
41(1)
4.2 Applying a function to all elements of a matrix
42(1)
4.3 Linear algebra calculations with vectors and matrices
43(3)
4.4 Statistical calculations
46(3)
4.5 Vectorized logical tests
49(1)
4.6 Other calculations
50(5)
5 Lists and Cell Arrays 55(10)
5.1 Creating lists and cell arrays
55(1)
5.2 Using lists and cell arrays
56(2)
5.3 Applying functions to all elements of lists and cell arrays
58(2)
5.4 Converting other data types to lists and cell arrays
60(1)
5.4.1 All values in a numeric vector or matrix
60(1)
5.4.2 Matrix, by columns or rows
61(1)
5.5 Converting lists and cell arrays to other data types
61(4)
5.5.1 Set of vectors to a single vector
61(1)
5.5.2 Set of vectors to matrix
62(1)
5.5.3 Set of sets to matrix
63(1)
5.5.4 Set of strings to a set of numeric vectors
63(2)
6 Flow Control 65(12)
6.1 Conditional ("if") statements
65(2)
6.2 "If/else" statements
67(2)
6.3 "for" loops
69(2)
6.4 "while" loops
71(1)
6.5 Breaking out of loops
72(1)
6.6 "switch" statements
73(3)
6.7 "ifelse" statements in R
76(1)
7 Running Code from Files: Scripts 77(6)
7.1 Current working directory
77(1)
7.2 The MATLAB search path
78(1)
7.3 Executing code from a file
78(1)
7.4 Creating a new script document in the editor
79(1)
7.5 Comments in script files
80(1)
7.6 Executing code from the editor window
81(1)
7.7 Summary of differences
82(1)
8 Writing Your Own Functions 83(16)
8.1 R
83(6)
8.1.1 Writing functions
83(2)
8.1.2 Calling functions
85(1)
8.1.3 Environments and variable scope
85(2)
8.1.4 Static variables
87(1)
8.1.5 Variable arguments
88(1)
8.2 MATLAB
89(7)
8.2.1 Inline and anonymous functions
89(1)
8.2.2 Writing functions
89(2)
8.2.3 Calling functions
91(2)
8.2.4 Environments and variable scope
93(1)
8.2.5 Static variables
94(1)
8.2.6 Variable arguments
95(1)
8.2.7 Function handles
96(1)
8.3 Summary of main differences
96(3)
9 Probability and Random Numbers 99(8)
9.1 Basic random values, permutations, and samples
99(2)
9.2 Random number seed
101(1)
9.3 Random variates from probability distributions
102(2)
9.4 PDFs, CDFs, and inverse CDFs
104(3)
10 Graphics 107(30)
10.1 Creating, selecting, and closing figure windows
107(1)
10.1.1 Creating windows
107(1)
10.1.2 Listing and selecting windows
108(1)
10.1.3 Closing windows
108(1)
10.2 Basic 2-D scatterplots
108(3)
10.3 Adding additional plots to a figure
111(1)
10.4 Axis ranges
111(1)
10.5 Logarithmic axis scales
112(1)
10.6 Background grid
112(1)
10.7 Plotting multiple data sets simultaneously
112(2)
10.8 Axis labels and figure titles
114(1)
10.9 Adding text to figures
114(1)
10.10 Greek letters and mathematical symbols
115(1)
10.11 Arrows
116(1)
10.12 Figure legends
117(2)
10.13 Size and font adjustments
119(1)
10.14 Two y axes
120(1)
10.15 Plotting functions
121(1)
10.16 Image plots and contours
122(4)
10.17 Colormaps
126(1)
10.18 3-D plotting
126(2)
10.19 Multiple subplots in one figure
128(3)
10.20 Saving figures
131(2)
10.21 Other types of plots
133(2)
10.22 Final notes about graphics
135(2)
11 Numerical Computing 137(10)
11.1 Root-finding
137(1)
11.1.1 Something to watch out for
138(1)
11.2 Univariate optimization
138(1)
11.3 Multivariate optimization
139(1)
11.4 Numerical integration
140(1)
11.5 Curve fitting
140(2)
11.5.1 Piecewise linear interpolation
140(1)
11.5.2 Polynomial fitting
141(1)
11.5.3 Splines
142(1)
11.6 Differential equations
142(5)
12 File Input and Output 147(18)
12.1 Opening files
147(1)
12.2 Reading a table of numbers
148(4)
12.2.1 Subsets of a data file
151(1)
12.3 Reading numeric data with a different comment character
152(1)
12.4 Reading numbers from a file where different lines have varying numbers of values
153(3)
12.5 Reading numbers and strings
156(3)
12.6 Reading the raw character data in, a line at a time
159(1)
12.7 Writing a table of numbers
159(1)
12.8 Writing a set of strings
160(1)
12.9 Saving and loading variables in binary format
161(1)
12.10 Images
162(1)
12.11 URLs
163(1)
12.12 Excel files
163(2)
13 Miscellaneous 165(12)
13.1 Working with variables
165(1)
13.2 Character strings
166(2)
13.3 Reading user input
168(1)
13.4 Recording a copy of commands and output
169(1)
13.5 Date calculations
169(1)
13.6 Miscellaneous
170(1)
13.7 Debugging
171(1)
13.8 Startup and shutdown sequences
172(1)
13.9 Add-ons: packages and toolboxes
173(1)
13.10 Object-oriented programming
174(1)
13.11 Other interfaces
174(1)
13.12 Efficiency/performance
175(2)
14 Calling C 177(22)
14.1 R
178(10)
14.1.1 Example and overview
178(3)
14.1.2 Printing, warnings, and errors
181(1)
14.1.3 Random numbers
182(3)
14.1.4 More advanced features
185(3)
14.2 MATLAB
188(11)
14.2.1 Example and overview
188(4)
14.2.2 Printing, warnings, and errors
192(1)
14.2.3 Random numbers
192(7)
Bibliography 199(2)
Index of R commands, variables, and symbols 201(6)
Index of MATLAB commands, variables, and symbols 207
David E. Hiebeler is an associate professor in the Department of Mathematics & Statistics at the University of Maine. He earned a PhD in applied mathematics from Cornell University. His research involves mathematical and computational stochastic spatial models in population ecology and epidemiology.