From 6e1d902dd4926ca47368ca9dc56b8750edb3e778 Mon Sep 17 00:00:00 2001 From: Lukas Gehrke <lukasgehrke@Lukass-MacBook-Pro.local> Date: Tue, 1 Jan 2019 14:39:33 +0100 Subject: [PATCH] Corrects misspelling. --- r/GetBirthdate.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r/GetBirthdate.R b/r/GetBirthdate.R index a925372..a00060c 100644 --- a/r/GetBirthdate.R +++ b/r/GetBirthdate.R @@ -13,7 +13,7 @@ library(data.table) ### Try to extract birthdate from infobox ### If there is no infobox, try to extract from introduction text getBirthdate <- function(article) { - # check + # check if vcard exists if(!grepl("vcard", article)) { # check first paragraph introduction <- getIntroduction(article) @@ -22,6 +22,8 @@ getBirthdate <- function(article) { birthdate <- str_extract_all(introduction, "\\([^()]+\\)")[[1]] # remove parentheses birthdate <- substring(birthdate, 2, nchar(birthdate)-1) + + return(birthdate) } else { # retrun Null if there is no birthdate return(0) -- GitLab