X-Git-Url: http://git.vanrenterghem.biz/www2.vanrenterghem.biz.git/blobdiff_plain/3c9920148567c38da1fd09f8665264c436d85a8a..9ca4c5d427319065ff4e884ddb4505343d5a779f:/source/posts/Fibonacci_golden_spiral.org?ds=sidebyside diff --git a/source/posts/Fibonacci_golden_spiral.org b/source/posts/Fibonacci_golden_spiral.org index 948ac3c..14ba5b0 100644 --- a/source/posts/Fibonacci_golden_spiral.org +++ b/source/posts/Fibonacci_golden_spiral.org @@ -1,5 +1,6 @@ #+TITLE: Creating a golden spiral in R #+AUTHOR: Frederik Vanrenterghem +#+filetags: :R:code: #+LANGUAGE: en #+PROPERTY: session *R* #+PROPERTY: cache yes @@ -9,10 +10,8 @@ #+OPTIONS: toc:nil #+date: <2019-09-16 22:03:03> -* What After having read the first part of a Rcpp tutorial which compared native R vs C++ implementations of a Fibonacci sequence generator, I resorted to drawing the so-called Golden Spiral using R. -* Details Libraries used in this example are the following #+BEGIN_SRC R :session R @@ -337,7 +336,6 @@ df <- data.frame(t(serie)) #+RESULTS: : TRUE -* Result With everything now ready in the right coordinate system, it's now only a matter of setting some options to make the output look acceptable. #+BEGIN_SRC R :session R :results output file graphics :file ../assets/golden_spiral-ggplot-coord-fixed.png :width 800 :height 800 :exports both ggplot(df, aes(x=X1,y=X2)) + @@ -355,5 +353,4 @@ ggplot(df, aes(x=X1,y=X2)) + y = "") #+END_SRC -* Note on how this post was written. -After a long hiatus, I set about using emacs, org-mode and ESS together to create this post. All code is part of an .org file, and gets exported to markdown using the orgmode conversion - C-c C-e m m. +Note on how this post was written: After a long hiatus, I set about using emacs, org-mode and ESS together to create this post. All code is part of an .org file, and gets exported to markdown using the orgmode conversion - C-c C-e m m.