Skip to content

Instantly share code, notes, and snippets.

View lvalnegri's full-sized avatar
📦
working on my R packages

luca lvalnegri

📦
working on my R packages
  • London, UK
View GitHub Profile
@lvalnegri
lvalnegri / covid_vaccine_reaction.R
Last active April 7, 2021 18:06
Download and clean UK MHRA Yellow Card Reporting for Covid Vaccines
message('Validating update...')
url <- 'https://www.gov.uk/government/publications/coronavirus-covid-19-vaccine-adverse-reactions/coronavirus-vaccine-summary-of-yellow-card-reporting'
x1 <- as.Date(
gsub('Updated ', '', rvest::html_text(rvest::html_node(xml2::read_html(url),'.publication-header__last-changed'))),
'%d %B %Y'
)
x2 <- readLines(file.path(dmpkg.funs::datauk_path, 'covid', 'vaccine', 'vaccine_adverse_reactions.date'))
if(is.na(x1)) q(save = 'no')
if(x1==x2) q(save = 'no')
@lvalnegri
lvalnegri / !R_structures
Last active July 21, 2017 15:08
small notes about data structures in R
...
@lvalnegri
lvalnegri / !git_commands
Last active February 11, 2021 21:11
main git commands
# configuring initial parameters
git config --global user.name "name surname"
git config --global usr.email "name@mail.com"
git config --global list
# create
ssh-keygen -t rsa -C "name@mail.com"
git init
@lvalnegri
lvalnegri / !R_packages_tips.md
Last active September 28, 2017 12:24
any trick, or trivial way to do thing that I easily tend to forget, about most used R packages