Publications by Francis Smart
Making random draws from an arbitrarily defined pdf
I recently found myself in need of a function to sample randomly from an arbitrarily defined probability density function. An excellent post by Quantitations shows how to accomplish this using some of Rs fairly sophisticated functional approximation tools such as integrate and uniroot. The only problem with this excellent post was that the machin...
3887 sym R (4626 sym/1 pcs) 10 img 1 tbl
More Readable Code with Pipes in R
Several blog posts have made mention of the ‘magrittr’ package which allows functional arguments to be passed to functions in a pipes style fashion (David Smith ).This stylistic option has several advantages: 1. Reduced requirements of nested parenthesizes2. Order of functional operations now read from left to right3. Organizational style o...
977 sym R (2043 sym/1 pcs) 2 img
1.2 Millions Deaths by Ebola projected within Six Months?
The World Health Organization, Samaratins Purse, Doctors Without Borders, and other international medical emergency relief programs are desperately calling for additional resources in the international fight against Ebola that has already killed thousands and is likely to kills thousands more even if a full arsenal of aid was made available.Figur...
9692 sym R (3927 sym/2 pcs) 12 img 6 tbl
Fun with Bordered Cubes
I am interested in generating 3D reasoning items in R. To this end I have adapted some of the awesome functions built in the rgl library to my ends. My new function is ‘cube’ and it takes position and automatically sizes itself as a 1x1x1 cube though this can be adjusted through the scale argument.Find the code on github # Easy Bordered C...
708 sym R (2392 sym/8 pcs) 16 img
How do you say π^π^π?
Well, not that you really probably want to know how to say such an absurdly large number. However for those of you who are interested (allowing for rounding) it is:one quintillion, three hundred forty quadrillion, one hundred sixty-four trillion, one hundred eighty-three billion, six million, three hundred thirty-nine thousand, eight hundred fort...
573 sym R (807 sym/2 pcs) 2 img
Ebola: Beds, Labs, and Warnings? Can they help? (Shiny App)
A month ago when the WHO was projecting estimates of the effect of current outbreak of Ebola being as deadly as affecting 20,000 people, I ran some elementary modelling and found that these estimates are far too small given the current trend. The motivation for the post was to raise awareness that situation could get far worse than anybody was ...
6187 sym 10 img 3 tbl
Julia style string literal interpolation in R
I feel like a sculptor who has been using the same metal tools for the last four years and happened to have looked at my comrades and found them sporting new, sleek electric tools. Suddenly all of the hard work put into maintaining and adapting my metal tools ends up looking like duck tape and bubble gum patches.I hate to say it but I feel that I...
2021 sym R (1160 sym/1 pcs) 2 img
Waterfall and 3D plotting exploration
Taking the very ‘waterfall graph’ code posted by Robert Grant I have added some features (resistance Overall I find the graphs produced from this code to be beautiful and fascinating though I am not sure if I would really use them as a form of data exploration. In addition, I am not sure if I would expect anybody to be able to understand what...
8766 sym 20 img 9 tbl
Make your own hotly criticised circle graph!!!
Make your own hotly criticized circle graph! The recent critical post on R-bloggers has got me wanting to make my own bubble graphs despite the popular criticism of the graph. After some attempts I have produced something that looks similar but needs some more work.I would like to say briefly that R-blogger post by PirateGrunt while interesting ...
1830 sym 4 img
Convergence of a Series
Let us explore using simulation some of the concepts of basic asymptotic theory as presented in Wooldridge 2012, Chapter 3.Definition: A sequence of nonrandom numbers {a_N:N=1,2,…} converges to a if for all epsilon>0 there exists N_epsilon such that N>N_epsilon, then $$|a_N – a|Paraphrase: A sequence converges on point a, if you can choose an...
3951 sym 12 img