Background I decided to send personalised Easter cards this year. The plan was to dig out photos of friend and make them more eastery. I found a lovely frame to add to the photos only to realise that I had no idea how to combine them. A quick internet search left me annoyed, so I decided to do what I always do. I turned to R! Getting to work I used the magick package.

Introduction Sometimes you want to send a message to the user of your shiny app , feedback <- function(input, id, value_lower, value_upper, value_model_lower, value_model_upper, units) { if(input<value_lower | input>value_upper) { hideFeedback(id) showFeedbackDanger( inputId = id, text = glue('The value entered, {input}, is outside of the range of accepted values') ) } else if (input<value_model_lower | input>value_model_upper) { hideFeedback(id) showFeedbackWarning( inputId = id, text = glue("This model has been developed for values between {value_model_lower} and {value_model_upper} {units}.

Background I’ve started a PhD! This has given me yet another reason to up my markdown game and this week I submitted my first abstract written in Rmarkdown. I’m planning on spending my PhD wasting way to much time obessing about my workflow. So why not get started? A few things worked well and some aspects still need some work. Word count When I started writing I kept knitting my document to check the word count but that very quickly got annoying.

Background I like the idea of short posts focussing on one function because there are so many great functions out there. I had been thinking about doing a function a week for a while. A post a week is way too ambitious but a month sounds better than most other time periods so I am sticking with it. Uncount A function that I think is really under appreciated is uncount.

It is Friday evening and my train from Toulouse is delayed [update: train ended up being 2h30 min late, please take this into account when judging this post on its length and coherence.]. My bag is heavy from all the stickers I have aquired and it is too hot for me to stroll around Toulouse. What better than to write up my thoughts on useR!2019? Overall impression I have had such a good time and I am leaving full of inspiration to try new packages and ways of working.

Motivation There are some things that I always forget how to do in R. I have decided to add some of those code snippets to this blog so I that I can look them up when I need them. Droping variables using a vector of names I often have a pre-specified vector of variables names that I use frequently and sometimes I want to drop those variables. The trick is to use one_of around the vector with variable names.

Background Back in March I wrote a blog post about my favourite board game Settlers of Catan. The code generates a random catan board but there is no interactivity for when you want to create a different random board. You can read it in its entirety here and somewhere in that post I promised to actually create an app so you can create your own board. I tried when I wrote the original blog post but I struggled with Shiny.

Emma Vestesson

I first started learning R in the autumn of 2012 but stopped after a couple of months as I didn’t use it. In January 2017 I rediscovered R again and this time I am sticking with it. After discovering blogdown and realising how many different short snippets of code I have hidden away on my computer I decided to share them on this blog instead.

Data analyst

London