R (programming language): Difference between revisions

Content deleted Content added
Mandelbrot set: Clarified the connection between the image on the right and the sample code on the left.
Line 405:
 
=== Mandelbrot set ===
[[File:Mandelbrot Creation Animation.gif|thumb|200px|"A Mandelbrot.gif" graphicset createdas visualized in R. (Note: ColorsThe colours in this image differ from actualthe output of the sample code in the "Mandelbrot set" section.)]]
This example of a [[Mandelbrot set]] highlights the use of [[complex numbers]]. It models the first 20 [[iteration]]s of the [[equation]] <code>z = z<sup>2</sup> + c</code>, where <code>c</code> represents different [[Complex number|complex constants]].
 
Line 414:
 
The sample code is as follows:
<syntaxhighlight lang="r">library(caTools)
library(caTools)
 
jet.colors <-
Line 453 ⟶ 452:
"Mandelbrot.gif",
col = jet.colors,
delay = 100)</syntaxhighlight>
</syntaxhighlight>
 
== Version names ==