Week 12 – Functions & Clusters

In this week’s lesson, we covered functions and clusters. Over the past few weeks, there have been several instances where we would copy and paste certain chunks of code and re-use them (modifying them slightly). By using functions, we can build our own code specifying the data, columns, and various other inputs to eliminate redundantly copying and pasting code. For example, we wrote a function for proc means and proc freq in R, something that can’t be done in 1 or 2 steps. Now, we ca re-use that function and others in the future to help eliminate unneeded extra work. Lastly, we talked about K Means clustering in R: very similar to SAS, but we used to analyze wine data and explore the different natural groupings of continuous variables within the dataset.

Leave a Reply

Create your own website, free on WordPress.com.Create your own website.
Start free