Welcome to Code Sharer, a code gallery for creating, saving and sharing all kinds of code snippets.

Snips Tagged "R" 8 results found

Simple Graph Plotting R 307
Author: Matt Posted On: Monday, November 3, 2014 at 9:30 PM


This is just a simple introduction to plotting graphs in R.





'type="l"' = line plot graph type

'xlab' and 'ylab' = x and y labels


'main' = title of graph

Regression line R 331
Author: Ryan Bradley-Evans (Admin) Posted On: Thursday, November 27, 2014 at 6:44 PM

Plot a regression line in R and print the summary of the regression line.





Error bars. R 286
Author: Ryan Bradley-Evans (Admin) Posted On: Friday, November 28, 2014 at 2:12 AM

Plot error bars for both x and y in R 

Christmas Tree R 342
Author: Ryan Bradley-Evans (Admin) Posted On: Tuesday, December 2, 2014 at 11:54 AM

Plots a Christmas tree with decorations in random places along the branches. try running the same code a few times to see for your self!


xmas tree





Save a graph as a pdf R 142
Author: Ryan Bradley-Evans (Admin) Posted On: Wednesday, December 14, 2016 at 7:46 AM

Insert you functions/datasets for X and Y after X<- and Y<- respectively 

Magic 8 ball Python 197
Author: Ryan Bradley-Evans (Admin) Posted On: Wednesday, December 14, 2016 at 8:04 AM

Only 8 examples are programmed in to this code. However it is very simple to add more.

Fractal Tree R 196
Author: Ryan Bradley-Evans (Admin) Posted On: Monday, August 21, 2017 at 2:43 PM


Fractal Tree

Barnsley’s Fern Fractal R 256
Author: Ryan Bradley-Evans (Admin) Posted On: Tuesday, August 22, 2017 at 10:11 AM


Fractal Tree