Last active
November 28, 2019 12:11
-
-
Save mcguinlu/a8a046eacb8c3ed52e557c3314c3fb0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyr) | |
# Prep RAYYAN extract for ML ---------------------------------------------- | |
test <- read.csv("articles.csv") | |
# Remove day/month | |
test <- test[,c(1:3,6:17)] | |
test$notes <- gsub("RAYYAN", "| RAYYAN", test$notes) | |
test2 <- separate(test, notes, c("notes","relevant", "notes3", "notes4"), sep = "\\|") | |
test2$relevant <- gsub("RAYYAN-INCLUSION: \\{\"Luke\"=>\"Excluded\"\\}", "0",test2$relevant ) | |
test2$relevant <- gsub("RAYYAN-INCLUSION: \\{\"Luke\"=>\"Included\"\\}", "1",test2$relevant ) | |
test2$relevant <- gsub("RAYYAN-INCLUSION: \\{\"Luke\"=>\"Maybe\"\\}", "0.5",test2$relevant ) | |
# Map to relevant keywords from original extract |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment