Sunday, March 6, 2016

Module 8 : Input/Output, String Manipulation & PLYR Package

Module 8 was one of the most interesting areas of focus so far in this course. I really enjoyed learning about how to use data from files, both in terms of input and output. I am beginning to envision different ways in which the R language can be used, and the ability to use files adds a very useful dimension to it.

The first step in this week's assignment was to import the dataset, which was provided as a .txt file initially. We have done this before, and it wasn't much of a challenge! I also installed the "pylr" package which is used for working with groups of information in a larger set, among other things.



I then ran plyr generates for the mean for both Age and Grade, split by gender. After this, I output the data from y into a file called Sorted_Average:


In order to make a .csv file, I made the following adjustment:


The final phase of the assignment was to output only those names that included the letter i or I, and then to output that to a file:



No comments:

Post a Comment