Skip to content

Instantly share code, notes, and snippets.

View mcguinlu's full-sized avatar

Luke McGuinness mcguinlu

View GitHub Profile
devtools::install_github("mcguinlu/robvis")
devtools::install_github("mcguinlu/triangulate")
library(dplyr)
# View the example dataset included in the robvis package
# This is what I am guessing your data from the assessments should look like
View(robvis::data_bias_direction)
# Notes on column names:
# d*j = judgement for domain *
@mcguinlu
mcguinlu / everyman.R
Created July 21, 2021 12:30
Everyman - Premier Tickets (will need Selenium)
t <- "https://www.everymancinema.com/bristol"
today <- "2021-07-21"
tmp <- read_html(t) %>%
html_nodes(
xpath = glue::glue(
'//div[@data-film-session="{today}"] //*[contains(concat( " ", @class, " " ), concat( " ", "filmTimeItem", " " ))]',
today = today
)
library(shiny)
library(rsvg)
library(DT)
library(rio)
source("functions.R")
template <- read.csv("www/PRISMA.csv",stringsAsFactors = FALSE)
# Define UI for application that draws a histogram
---
title: "metafor test"
output: html_document
---
```{r setup_main, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(metafor)
---
title: "metafor test"
output: html_document
---
```{r setup_main, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(metafor)
library(rtweet)
library(tidyr)
library(dplyr)
library(ggplot2)
rt1 <- search_tweets(
"#ESMARConf2021", n = 20000, include_rts = TRUE
)
rt2 <- search_tweets(
"#ESMARConf", n = 20000, include_rts = TRUE
all_caps <- function(x) {
x_v <- stringr::str_to_lower(x) %>%
stringr::str_split(stringr::boundary()) %>%
unlist()
for (position in 1:nchar(x)) {
x_v[position] <- paste0("[",stringr::str_to_upper(x_v[position]),x_v[position],"]")
}
query <- list("[Mm]endelian","[Rr]andomi[sz]ation","[Bb]ias")
# medrxiv ----
# Get local copy of the databases
mx_data <- medrxivr::mx_snapshot() # medrxiv
# Limit to unpublished studies
mx_data_unpublished <- dplyr::filter(mx_data, is.na(published))
# Run search
devtools::install_github("nealhaddaway/PRISMA2020")
library(PRISMA2020)
# This is the template CSV file, available from the PRISMA2020 repo
# You'll need to edit the numbers in this file to update the image
data <- read.csv("https://raw.githubusercontent.com/nealhaddaway/PRISMA2020/master/inst/extdata/PRISMA.csv",
stringsAsFactors = FALSE)
# Set the data as PRISMA data
data <- read_PRISMAdata(data)
library(shiny)
library(DT)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Old Faithful Geyser Data"),
DT::dataTableOutput("mytable")