Lecture 6
Xiaotong Suo
Todays agenda
Some common func7ons, which are really
useful
Regular expressions- working with text
Conver7ng one variable to another
as.numeric
Lecture 7
Xiaotong Suo
Warm-up
Lets do some exercises!
Paste func;on
How to paste a vector of strings together?
Metaharacters
Parenthesis are typically us
Lecture 5
Xiaotong Suo
Todays Agenda
Control structures
Regression Analysis
Control structure con9nued
Apply func9on
Some9mes we want to apply a func9on to each
ind
Lecture 4
Xiaotong Suo
Homework 1
Ques7on 3
Todays agenda
Data input/output
Graphics
Data input/output
R can write matrix and data frames to le using the
f
CME/Stats 195
Lecture 2
Xiaotong Suo
[email protected]
More logis>cs
Knowledge of some calculus
Course enrollment
Five candies rule
Apologies for the coursework
Oc
Lecture 3
Xiaotong Suo
Logis1cs
HW 1 due on Wednesday before the class. No
late homework will be accepted. Note that
you have to get at least 60% on each
hom
Homework 2
Xiaotong
April 10, 2015
Due: April 17th, Friday
Your name: (10%)
1
Problem 1
(40%) Using only multiplication, summation, matrix or vector manipulations,
the power function, and the function
Homework 3
Xiaotong Suo
April 21, 2015
Your name is:
1
Problem 1
(5%) X is a 10 10 data frame. What does the following code do?
x[abs(x[,7]< 1, ]
x[which(x[,10]>0)&(x[,10] <9),]
2
Problem 2
(15%)You h