Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

R version 3.2.

3 (2015-12-10) -- "Wooden Christmas-Tree"


Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> x <- c(1,2,4)
> q <- c(x,x,8)
> x
[1] 1 2 4
> x[3]
[1] 4
> x <-c(1,2,4)
> x[2:3]
[1] 2 4
> mean(x)
[1] 2.333333
> sd(x)
[1] 1.527525
> y <- mean(x)
> y
[1] 2.333333
> y # print out y
[1] 2.333333
> data()
> mean(Nile)
[1] 919.35
> hist(Nile)
> data()
> hist(Nile)
>

You might also like