Introduction to Me!

Hello, my name is Loi Phuoc Ly. You can call me Fedy. I am from Vietnam. I am a senior student at University of Cincinnati with Business Analyst. I grew up in West Vietnam in Rach Gia City, Kien Giang Province.

Academic Background

Academic Projects

Experience with R

I am a complete beginner to R. I have never had any experience with R before. I am currently taking a Data Mining class studying R.

Week 1 Exercises

1: BMI

wt<- 150 ht<- 68 bmi<- wt * 703 / ht^2 bmi

2: Cost of Pizza

diameter <- 12 cost <- 8 area = pi * (diameter / 2)^2 cost / area

diameter <- 15 cost <- 12 area = pi * (diameter / 2)^2 cost / area

3: Calculating Roots

sqrt(140.51) (14 0.51)^(1/3) n <- c(1, 2, 3, 4, 5) n (14 * 0.51)^(1/n)

4: Analyzing a Vector of Weights

kg <- c(69, 62, 57, 59, 59, 64, 56, 66, 67, 66) lbs <- kg * 2.20462 mean(lbs) var(lbs) sd(lbs) range(lbs) lbs[lbs > mean(lbs)]

5: More BMI

hts <- c(62, 58, 61, 61, 59, 64, 63, 61, 60, 62) bmi <- (lbs * 703) / hts^2 mean(bmi)

6: Sequences

0:1 seq(from = 0, to = 1, by = 0.1)

10:1 seq( from = 10, to = 1, by = 0.5)

rep(1:3, times = 3) rep(c(“a”, “c”, “e”, “g”), each = 3) rep(c(“a”, “c”, “e”, “g”), times = 3) rep(1:3, each = 3, times = 2) rep(1:5, times = 5:1) rep(c(7, 2, 8, 1), times = c(4, 3, 1, 5))

7: Ordering names and heights of 3 kids

child_names <- c(“John”, “Jack”, “Jane”) ht <- c(63, 59, 60)

height_ord <- order(ht) names_sort <- child_names[height_ord] names_sort ## [1] “Jack” “Jane” “John”

child_names <- c(“Alfred”, “Barbara”, “James”, “Jane”, “John”, “Judy”, “Louise”, “Mary”, “Ronald”, “William”) ht <- c(62, 58, 61, 61, 59, 64, 63, 61, 60, 62) height_ord <- order(ht) names_sort <- child_names[height_ord] names_sort

8: Missing values

mydata <- c(2, 4, 1, 6, 8, 5, NA, 4, 7) mean(mydata) mean(mydata, na.rm = TRUE)