1 Introduction

R is so powerful that it can do almost anything for you.

1.1 Example 1

The following example introduces the use of R.

a=8
b=9
c=a+b
print(c)
## [1] 17

1.2 A Second Example

The following will make a scatterplot.

# Data vector x
x=c(3,6,8,2,6,7,4,9)

# Data vector y
y = c(89, 98, 95, 67, 88, 94, 56, 99)

# Calculate mean of x
mean(x)
## [1] 5.625
# calculate mean of y
mean(y)
## [1] 85.75
# creates a scatter plot
plot(y~x)

2 Application