You are on page 1of 21

R ( R- Base Language)

R
R
S FPL(functional
programming language) case sensitivity


freeware

2
Window Ubuntu
Window
http://mirror.kapook.com/cran/


R Window
1. R-2.9.2-win32.exe

2.
Next

3.

, , ,
Next

4.
Next

5.
Next

6. option
Next

7. Start Menu
Dont create a Start Menu folder
Next

8. Short Cut Registry


Next

9. +

10.

Finnish
R Ubuntu
1. Terminal
2.
sudo apt-get update

3.
Sudo apt-get install r-base

Y

R - base
c() vector list
:
<- c(1,2)

scan()
:

<- scan()

edit()
:

<-edit()

plot() plot
:

plot(x,y) x y
x

lines()
:

lines(x,y) x y
x

barplot() plot
:

barplot (x,y) x y
x

pie() plot pirchart


:

pie (x,y) x y
x

cbind()
:

cbind()

rnorm()
:

rnorm()

data.entry()

data.entry()


directory
R working directory (wd)

directory getwd( )
argument working directory
setwd( dir) working directory dir
setwd(D:/Documents and Setting/data1)
D:/Documents and Setting/data1

read.table()


typeof()

"NULL"
"environment"
"integer"
"double"
"expression"

y
y 4

operators
<

>

= =
>=

<=

help


x x
switch


fruit

banana



> assign("x", c(10.4, 5.6, 3.1, 6.4, 21.7))

> c(10.4, 5.6, 3.1, 6.4, 21.7) -> x

Index matrices

> x <- array(1:20, dim=c(4,5)) 1-20


4*5
>x array

print

10.08, 10.11, 10.09, 10.10, 10.12 mL



titrant

c()
built-in mean() sd()
(arithmatic mean)
(standard deviation)
titrant2

random number

1-30


linear regression
least squares method
calibration curve

(intensity) (conc)


Y 1.518
1.930

Plot
plot () abline()
y=a+bx
txt
legend()

box plot

box-plot

50534321 301

You might also like