Sunday, January 31, 2016

Module 3 : Data.frame and Much More!

This was quite a difficult module for me! I didn't have problems understanding about matrices, data tables, lists or the other topics discussed in the reading, but I did have some problems running the procedure in the assignment tutorial using the following as a data source:

Name <- c("Jeb", "Donald", "Ted", "Marco", "Carly", "Hilary", "Bernie")
"ABCP" <- c(4, 62, 51, 21, 2, 14, 15)
"CBSP" <- c(12, 75, 43, 19, 1, 21, 19)

Following is what I was able to complete:



As you can see, I was able to create the data frame and display it. Looks nice! I started to have problems from this point down, where I am entering mean(results.df) and receiving the warning message mentioned in the tutorial. I am not sure how to avoid this, unfortunately.

From this part on, I am really sure sure where the data is coming from. Nothing had been created for C previously and so R Studio is not recognizing it as an object. Further, I am not sure how I would apply that to the polling data we were given for this assignment. I do certainly understand the concepts behind the work, both from the book and in the assignment itself, but I would love some input or insight from anyone who has a better idea.

Sunday, January 24, 2016

Module 2 : Objects, Functions and Vectors

R is a very new programming language to me, and to be honest, I’m a little nervous about the course because I have not fared too well in C++ and Java alike. I really love statistics (also didn’t do great in that course) and I love big data. As such, the notion of learning and understanding R programming language is very attractive for me in the E-Commerce & Internet Marketing field where I am currently, and plan to be for many years to come. On its face, R doesn’t look to be too overwhelming in terms of understanding how the language and syntax works, as well as its capabilities.

Module #1 has been good to me so far! I was able to follow the assigned tutorial with relative ease, although I did have problems creating a scatter plot of a data set using plot(x = s$age_husband , y = s$age_wife, type = ‘p’) due to an error that the s object could not be found. I am not sure how the writer was able to accomplish this and I would welcome any comments that can provide me with the necessary insight. I thought the transformation of data was pretty smooth using the R interface, and I took some time to play around with different equations, based initially off of the equations presented in the tutorial.

This Module covered, in large part, Objects, Functions and Vector. Data can be stored in Objects, and then when the Object is called, it is replaced with the data that is saved inside. Functions are types of procedures or routines, and are especially important in R because the language has so many pre-existing functions to execute complex tasks. Common examples of functions include mathematical functions that determine the mean, standard deviation, sum and others. Vectors are defined as a sequence of data elements of the same basic type, which is a lot like a string of common elements.