R TUTORIAL, Part I: Derivatives

R is a statistical analyzation language, and that means it is very good at data manipulation and data analyzation. One key way to analyze data is through plotting, and R excels in this field.

\[ y' = f(x,y), \qquad y(x_0 ) = y_0 . \]

Functions

Clear one variable

 rm(x)
Clear two variables
 rm(x,y)
Clear all variables
 rm(list=ls())
See what type of object x is
 class(x)
and typeof(x) give differ- ent aspects of the “type” of x.

Variable names may contain letters, digits, the period, and the underscore character. They cannot begin with a digit or underscore, or with a period followed by a digit. Names are case-sensitive.

     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9

 

  1. Schiesser, W.E., An Introductory Comparison of Matlab and R, Lehigh University, Bethlehem, USA.
  2. Soetaert, K, Cash, J., Mazzia, F., Solving Differential Equations in R, 2012, Springer, Heidelberg New York Dordrecht London