# Lab 1
# This is the R code for Lab 1
# 1/20/2015


4 + 5 - 24/6
(6-4)*3

5^2
5**2


1:8

seq(1,10,1)

x <- 1:9
x
x <- 6
x
x + 10

x <- x + 10


x <- 1:9
mean(x)
mean(1:9)
sd(x)

sum(x)
min(x)
max(x)

#this is the max of the vector x
max_x <- max(x)
max_x
avg <- mean(x)

x <- c(2,3,5)
x

b <- x[2] 

?max
?seq
seq(to = 10,from = 1, by = 2)
seq(10,1,2)

titanic <- read.table("http://myweb.uiowa.edu/pbreheny/data/titanic.txt", header = TRUE)
View(titanic)
