Publications by R on Alan Yeung
Hacking dbplyr for CKAN
Aim Create a dummy database Test dbplyr’s SQL translation Modify dbplyr’s SQL translation Testing the dbplyr hack Concluding notes At the end of my first post on CKAN discussing how to use the CKAN API to extract data from the NHS open data platform directly into R, I talked about how it would be neat to write some wrapper functions to make ...
5758 sym R (2217 sym/6 pcs)
objectremover RStudio Addin
A Learning Exercise Workflow I created my first ever R package and got it released onto CRAN in March 2019. It’s taken me a while to get round to actually writing about this which tells me that despite many years of trying to overcome procrastination, I’m obviously still not there! The package is actually an RStudio addin called objectremove...
5913 sym 4 img
objectremover RStudio Addin
A Learning Exercise Workflow I created my first ever R package and got it released onto CRAN in March 2019. It’s taken me a while to get round to actually writing about this which tells me that despite many years of trying to overcome procrastination, I’m obviously still not there! The package is actually an RStudio addin called objectremove...
5913 sym 4 img
Trying the ckanr Package
How resources are grouped in CKAN Initialising ckanr and exploring groups of resources Connect to CKAN with dplyr and download from one resource Downloading all resources from a dataset In previous blog posts (Hacking dbplyr for CKAN, Getting Open Data into R from CKAN) I have been exploring how to download data from the NHS Scotland open data p...
5052 sym R (7137 sym/7 pcs) 2 img
Trying the ckanr Package
How resources are grouped in CKAN Initialising ckanr and exploring groups of resources Connect to CKAN with dplyr and download from one resource Downloading all resources from a dataset In previous blog posts (Hacking dbplyr for CKAN, Getting Open Data into R from CKAN) I have been exploring how to download data from the NHS Scotland open data p...
5052 sym R (7137 sym/7 pcs) 2 img
Scotland’s Most Popular Babynames
Downloading the data Shiny App I recently saw this great post on Nathan Yau’s FlowingData website which guesses a person’s name based on what the name starts with. It also needs you to select a gender and a decade for when you were born before it can guess. Of course, it isn’t really a guess and is really just based on proportions calculat...
2316 sym R (4230 sym/2 pcs)
Scotland’s Most Popular Babynames
Downloading the data Shiny App I recently saw this great post on Nathan Yau’s FlowingData website which guesses a person’s name based on what the name starts with. It also needs you to select a gender and a decade for when you were born before it can guess. Of course, it isn’t really a guess and is really just based on proportions calculat...
2316 sym R (4230 sym/2 pcs)
Updating packages on a drat repo
This is just a small note (mainly for myself but hopefully may be of some use to a few others!) to remind of how to update a package on a drat repo. Create the source file for the package you want to host on the drat repo using devtools::build(). Clone the drat repo hosting the package (in my case https://github.com/alan-y/drat). Use drat::inser...
1382 sym R (56 sym/1 pcs)
Updating packages on a drat repo
This is just a small note (mainly for myself but hopefully may be of some use to a few others!) to remind of how to update a package on a drat repo. Create the source file for the package you want to host on the drat repo using devtools::build(). Clone the drat repo hosting the package (in my case https://github.com/alan-y/drat). Use drat::inser...
1382 sym R (56 sym/1 pcs)
Filtering with string statements in dplyr
A question came up recently at work about how to use a filter statement entered as a complete string variable inside dplyr’s filter() function – for example dplyr::filter(my_data, "var1 == 'a'"). There does not seem to be much out there on this and I was not sure how to do it either but luckily jakeybob had a neat solution that seems to work ...
1383 sym R (1406 sym/4 pcs)