From 1fc09a56151f0007c6863ee955cbb5b33b581550 Mon Sep 17 00:00:00 2001 From: David Fuhry <df15nocu@studserv.uni-leipzig.de> Date: Sun, 20 Jan 2019 16:13:41 +0100 Subject: [PATCH] Resolve "Add imports from utils" --- processing/wikiproc/DESCRIPTION | 2 ++ processing/wikiproc/NAMESPACE | 2 ++ processing/wikiproc/R/import_packages.R | 6 +++++- processing/wikiproc/man/get_birthplace.Rd | 4 ++-- processing/wikiproc/man/get_no_of_spouses.Rd | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/processing/wikiproc/DESCRIPTION b/processing/wikiproc/DESCRIPTION index 3d5ab21..c190fcb 100644 --- a/processing/wikiproc/DESCRIPTION +++ b/processing/wikiproc/DESCRIPTION @@ -26,5 +26,7 @@ Imports: WikipediR, reticulate, cleanNLP, + magrittr, + utils Suggests: testthat diff --git a/processing/wikiproc/NAMESPACE b/processing/wikiproc/NAMESPACE index cec814d..ee345f0 100644 --- a/processing/wikiproc/NAMESPACE +++ b/processing/wikiproc/NAMESPACE @@ -9,3 +9,5 @@ export(get_no_of_spouses) export(init_nlp) importFrom(data.table,"%like%") importFrom(magrittr,"%>%") +importFrom(utils,URLdecode) +importFrom(utils,write.table) diff --git a/processing/wikiproc/R/import_packages.R b/processing/wikiproc/R/import_packages.R index 06a0402..4bfe0c8 100644 --- a/processing/wikiproc/R/import_packages.R +++ b/processing/wikiproc/R/import_packages.R @@ -7,4 +7,8 @@ #' @importFrom data.table %like% #' @importFrom magrittr %>% -NULL \ No newline at end of file +#' @importFrom utils URLdecode write.table +NULL + +# Make R CMD check happy +if(getRversion() >= "2.15.1") utils::globalVariables(c(".")) diff --git a/processing/wikiproc/man/get_birthplace.Rd b/processing/wikiproc/man/get_birthplace.Rd index 0db95fe..75ecd8f 100644 --- a/processing/wikiproc/man/get_birthplace.Rd +++ b/processing/wikiproc/man/get_birthplace.Rd @@ -4,7 +4,7 @@ \alias{get_birthplace} \title{This script extracts Birthplace from physicist texts Try to get the infobox and extract the birthplace -If there is no infobox, 0 will be returned as +If there is no infobox, NA will be returned as birthplace is hard to extract from text} \usage{ get_birthplace(article) @@ -18,6 +18,6 @@ String with birthplace of the physicist|0 \description{ This script extracts Birthplace from physicist texts Try to get the infobox and extract the birthplace -If there is no infobox, 0 will be returned as +If there is no infobox, NA will be returned as birthplace is hard to extract from text } diff --git a/processing/wikiproc/man/get_no_of_spouses.Rd b/processing/wikiproc/man/get_no_of_spouses.Rd index 131c526..bd8a78e 100644 --- a/processing/wikiproc/man/get_no_of_spouses.Rd +++ b/processing/wikiproc/man/get_no_of_spouses.Rd @@ -21,6 +21,6 @@ articles <- get_data() no.spouses <- get_no_of_spouses(articles$Text[54]) -no,spouses +no.spouses } } -- GitLab