<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/new-book-and-package-pmfdr/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://msperlin.github.io/2017-03-26-pmdR-exercises/"> R and Finance</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p> Processing and modelling financial data with R – </p>
<p>My Portuguese book about finance and R was<br>
<a target="_blank" rel="nofollow" href="https://www.amazon.com/s/ref=nb_sb_ss_c_1_18?url=search-alias%3Daps&field-keywords=processamento+e+modelagem+de+dados+financeiros+com+o+r&sprefix=processamento+e+mo%2Caps%2C287&crid=3SDV8WWLKP3H4">published</a><br>
a couple of months ago and, given its positive feedback, I decided to<br>
work on the english version immediately. You can find details about my<br>
experience in self publishing the book in this<br>
<a target="_blank" rel="nofollow" href="https://msperlin.github.io/2017-02-16-Writing-a-book/">post</a>.</p>
<p>The English book is not a simple translation of text and examples. This<br>
is a long term project that I always dreamed of doing. With time, I plan<br>
to keep the Portuguese and English version synchronized. The feedback I<br>
got from the Portuguese version was taken into account and I wrote<br>
additional sections covering advanced use of <code>dplyr</code> with list-columns,<br>
storing data in SQLITE, reporting tables with <code>xtable</code> and <code>stargazer</code>,<br>
and many more.</p>
<p>The book is not yet finished. I’m taking my time in reviewing everything<br>
and making sure that it comes out perfectly. I believe it will be ready<br>
in a few months or less. If you are interested in the book, please go to<br>
its <a target="_blank" rel="nofollow" href="https://sites.google.com/view/pmfdr/home">website</a> where you can<br>
find its current TOC (table of contents), code and data.</p>
<p>If you want to be notified about the publication of the book, please<br>
sign this <a target="_blank" rel="nofollow" href="https://goo.gl/forms/ViTXWClGCduO8f8J3">form</a> and I’ll let<br>
you know as soon as it is available.</p>
<h1>Package <code>pmfdR</code></h1>
<p>Yesterday I released package <code>pmfdR</code>, which provides access to all<br>
material from my book <strong>Processing and Modelling Financial Data with<br>
R</strong>, including code, data and exercises.</p>
<p>The exercises are still not complete. I expect to have at least 100<br>
exercises covering all chapters of the book. As soon as the book is<br>
finished, I’ll starting working on it.</p>
<p>With package <code>pmfdR</code> you can:</p>
<ol>
<li>Download data and code with function <code>pmfdR_download.code.and.data</code></li>
<li>Build exercises with function <code>pmfdR_build.exercise</code></li>
</ol>
<h2>Downloading code and data</h2>
<p>All the R code from the book is publicly available in<br>
<a target="_blank" rel="nofollow" href="https://github.com/msperlin/pmfdR-en-code_data/">github</a>. Function<br>
<code>pmfdR_download.code.and.data</code> will download a zip file from the<br>
repository and unzip it at specified folder. Have a look in its usage:</p>
<div>
<pre><code>if (!require(pmfdR)){
  install.packages('pmfdR')
  library(pmfdR)
} 

my.lan &lt;- 'en' # language of code and data ('en' or 'pt-br')

# dl may take some time (around 60 mb)
pmfdR_download.code.and.data(lan = my.lan)

dir.out &lt;- 'pmfdR-en-code_data-master'

# list R code
list.files(dir.out, pattern = '*.R')
list.files(paste0(dir.out,'/data'))
</code></pre>
</div>
<h2>Building exercises</h2>
<p>All exercises from the book are based on package <code>exams</code>. This means<br>
that every reader will have a different version of the exercise, with<br>
different values and correct answer. I’ve written extensively about the<br>
positive aspects of using <code>exams</code>. You can find the full post<br>
<a target="_blank" rel="nofollow" href="https://msperlin.github.io/2017-01-30-Exams-with-dynamic-content/">here</a></p>
<p>You can create your custom exercise file using function<br>
<code>pmfdR_build.exercise</code>. Give it a try, just copy and paste the following<br>
chunk of code in your R prompt.</p>
<div>
<pre><code>if (!require(pmfdR)){
  install.packages('pmfdR')
  library(pmfdR)
} 

my.lan &lt;- 'en' # language of exercises
my.exercise.folder &lt;- 'pmfdR-exercises' # name of folder with exercises files (will download from github)
my.pdf.folder &lt;- 'PdfOut' # name of folder to place pdf file and answer sheet

pmfdR_build.exercise(lan = my.lan,
                     exercise.folder = my.exercise.folder, 
                     pdf.folder = my.pdf.folder)

list.files(my.pdf.folder)
</code></pre>
</div>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://msperlin.github.io/2017-03-26-pmdR-exercises/"> R and Finance</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Em2O3xYQapU"></a></div>