RObservations #48: Exploring All Possible Hands in 5 card Poker
bensstats
by Benjamin Smith
6M ago
Introduction Recently, I have been reading “Mathematical Statistics” by Professor Keith Knight and I noticed a interesting passage he mentions when discussing finite sample spaces: *In some cases, it may be possible to enumerate all possible outcomes, but in general such enumeration is physically impossible; for example, enumerating all possible 5 card poker hands dealt from a deck of 52 cards would take several months under the most favourable conditions. * (Knight 2000) While this quote is taken out of context, with the advent of modern computing this is a task which is definitely possible ..read more
Visit website
RObservations #47 : Knitting .Rmd Files to Google Docs with knit2docs
bensstats
by Benjamin Smith
1y ago
Introduction RMarkdown is a powerful framework for writing a documents that contain a mixture of text, code, and the output of the code. Popular output formats for RMarkdown Documents (.Rmd) include HTML, PDF and Word Documents. It is also possible to output RMarkdown documents as part of a static website using blogdown package and is (still!) possible to publish RMarkdown documents to WordPress sites as well (like this one)! Recently, I started to look into the possibility of outputting an .Rmd file as a Google Doc, but I was unable to locate any out-of-box solutions. After looking into the i ..read more
Visit website
RObservations #46: Starmaps and Shiny- I Replicated an E-Commerce Store Using My Custom Package, starBliss
bensstats
by Benjamin Smith
1y ago
Introduction Recently, I released a R package called starBliss that aimed to replicate the output of a e-commerce site called MapsForMoments – a site which lets users order custom prints of the night sky on the date of their choosing (usually a special occasion such as a birthday, first date, wedding etc.) and allows them to choose a style, and add some custom text. It was a great experience getting to build the package which replicated the MapsForMoments product and I was shocked to see how well it was received when I posted about it- with the Github receiving over 30 stars at the time of wri ..read more
Visit website
RObservations #45: Making Beautiful Star Maps With The `starBliss` Package
bensstats
by Benjamin Smith
1y ago
Introduction Continuing my explorations in developing custom map art, I decided to take a detour from developing the mapBliss package to explore another type of map which is very popular in the map-art space- star and constellation maps! This initially started out as an issue opened on the mapBliss Github. However, I quickly realized the framework required for making star maps is completely different from making regular maps for custom fight paths and road trips. In this blog I introduce the “cousin” to the mapBliss package – starBliss! While it is still very basic I am very happy how it turn ..read more
Visit website
RObservations #44: Adding Frame and Custom Title Support To mapBliss
bensstats
by Benjamin Smith
1y ago
Introduction The mapBliss package is a R package which I developed which allows for users to make custom souvenir quality maps of their flights, road trips and favorite cities by utilizing the power of the leaflet and other R packages (for a full list, see the Github README here). The goal of the package is to imitate the visualization and print-ability of maps produced by businesses like Atlas.co(my original inspiration), TheLittlePen, Mapiful and MaptracksMe (among many other such businesses). To get caught up on how this package came to be check out the earlier blogs: I reverse-engineered ..read more
Visit website
RObservations #43 : Control Individual Label Positions In mapBliss With `_flex()` Functions
bensstats
by Benjamin Smith
1y ago
Introduction After introducing the mapBliss package to the world, I was pleased to see that people started using it and were experimenting with making their own map art! On Github, the package got a few stars, some issues opened/closed and some improvements have been made since my last blog on the topic. If you haven’t followed the journey of mapBliss so far check out these blogs: I reverse-engineered Atlas.co (well, some of it) Using the MapBox API with Leaflet Plotting Flight Paths on Leaflet Maps Packaging My Route Map Code! Introducing mapBliss. While I thought the job was done ..read more
Visit website
RObservations #42: Using the jinjar and tidyRSS packages to make a simple newsletter template
bensstats
by Benjamin Smith
1y ago
Introduction Jinja is a powerful templating engine that is useful in a variety of contexts. Recently, I discovered how its possible to use the power of Jinja syntax in R with the jinjar package written by David C Hall. With jinjar and the tidyRSS package by Robert Myles it is possible to make an email template that can provide short and informative updates. In his blog, I’m going to share how the jinjar and tidyRSS packages work and show how to combine them to make a simple daily email newsletter. How jinjar Works jinjar allows for users to create templates with regular text (or HTML or Markdo ..read more
Visit website
RObservations #41: Making a “Matlab Pumkin” in R
bensstats
by Benjamin Smith
1y ago
Introduction A while back I saw the Mathworks LinkedIn page make a post on how it is possible to make a Pumkin and other autumn gourds with Matlab code (for a more complete list of how to make other autumn Gourds in Matlab, check out Eric Ludlam’s Github repository). Seeing this inspired me to give it a shot in R and explore using 3D graphics with a playful example. In this short blog I share my attempt with how to make the a 3D pumpkin in R using the pracma and rgl libraries. Matlab Code The Matlab Code which was posted by Mathworks is: % Pumpkin [X,Y,Z]=sphere(200); R=1-(1-mod(0:.1:20,2 ..read more
Visit website
RObservations #39: Uncovering A Stranger Side Of The Collatz Conjecture
bensstats
by Benjamin Smith
1y ago
Introduction The Collatz Conjecture is one of the most famous unsolved problems in mathematics which only requires the knowledge of 4th grade math to understand. This blog was initially intended to show how to code the Collatz conjecture as function and visualize stopping times as well as the hailstone sequences for some positive integers. However when exploring this further, things took a turn to the stranger side of things. I’m not sure if these findings are meaningful, but I hope you enjoy them nonetheless! What is the Collatz Conjecture? The Collatz Conjecture (also known as the 3n+1 probl ..read more
Visit website
VBATime #1: Writing A Custom VLOOKUP Function With VBA
bensstats
by Benjamin Smith
1y ago
VBA is a language which I dabble with from time to time and often when making Excel-based solutions, having to use VBA becomes inevitable. Recently, I needed to create a function that worked slightly different from VLOOKUP and required me to look deeper into how VLOOKUP works. This inspired me to explore the functionality of VLOOKUP and how its possible to make a similar function with a few lines of VBA code. If you are new to VBA or never tried it, I highly recommend checking out Wise Owl’s tutorials on the topic. If you ask me, going through all the tutorials there will have you job ready ..read more
Visit website

Follow bensstats on FeedSpot

Continue with Google
Continue with Apple
OR