Module 9
Module 9 Remarks:
The above screenshots capture the immediate resultant tables, code, and console output for the code given for the module 9 assignment. You can watch as the assignment progresses the same processes that were introduced t the beginning are expanded upon and more engaging with a finer scope for editing, cleaning and manipulating data.
Module 9 Code:
#Module 9 Assignment
#Question 1
assignment_data <- data.frame( Country = c("France","Spain","Germany","Spain","Germany", "France","Spain","France","Germany","France"), age = c(44,27,30,38,40,35,52,48,45,37), salary = c(6000,5000,7000,4000,8000), Purchased=c("No","Yes","No","No","Yes", "Yes","No","Yes","No","Yes"))
#Question 2
assignment9 <- table(mtcars$gear, mtcars$cyl, dnn=c("gears"))
#Question 2.1
addmargins(assignment9)
#Question 2.2
prop.table(assignment9)
#Question 2.3
prop.table(assignment9, margin = 1)
Comments
Post a Comment