#+TITLE: Creating a golden spiral in R\r
#+AUTHOR: Frederik Vanrenterghem\r
+#+filetags: :R:code:\r
#+LANGUAGE: en\r
#+PROPERTY: session *R* \r
#+PROPERTY: cache yes \r
#+OPTIONS: toc:nil \r
#+date: <2019-09-16 22:03:03>\r
\r
-* What \r
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.\r
\r
-* Details\r
Libraries used in this example are the following\r
\r
#+BEGIN_SRC R :session R\r
#+RESULTS:\r
: TRUE\r
\r
-* Result\r
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.\r
#+BEGIN_SRC R :session R :results output file graphics :file ../assets/golden_spiral-ggplot-coord-fixed.png :width 800 :height 800 :exports both\r
ggplot(df, aes(x=X1,y=X2)) +\r
y = "")\r
#+END_SRC\r
\r
-* Note on how this post was written.\r
-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.\r
+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.\r