Homework: Making csv files in R

 


Above is the graph that I created this week. It has 10 data points, each labeled with an ID 1 through 10. The axis are ID log10(ID) versus ID^2. Each of these data points also has a small amount of normally distributed noise added to the result. I chose these functions because they are both common run time analysis equations and I wanted to show graphically that the quadratic function grows faster than the logarithmic function. The red line is the y=x line. The data points I created are below y=x, which means that the x values increase faster than the y values. That means that the quadratic function on the x axis grows faster than the logarithmic function on the y axis.


Attached is my code. It was fairly convenient to add all of these values directly into R because there were not many data points. However, I would not do it if I have a lot of data points because I would have to manually add all of the values in the first column first before I can add any of the rules in the other columns. And if I was collecting real data, it would be hard for me to keep track of the columns. So if I were collecting real data, I would first put my data into a spread sheet and then upload it into R.


Comments

Popular posts from this blog

R: Current Knowledge on Modeling

Project: Update

Homework: A Plot using ggplot