Spaces:
Sleeping
Sleeping
Update OpenAlexEdges.R
Browse files- OpenAlexEdges.R +15 -3
OpenAlexEdges.R
CHANGED
@@ -3,8 +3,20 @@ authorPubEdges <- function(keywords,pub_start_date,pub_end_date){
|
|
3 |
keywords <- keywords
|
4 |
pub_start_date <- pub_start_date
|
5 |
pub_end_date <- pub_end_date
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
search_engine <- function(keywords,pub_start_date,pub_end_date){
|
9 |
suppressPackageStartupMessages(library(openalexR))
|
10 |
suppressPackageStartupMessages(library(tidyverse))
|
@@ -180,5 +192,5 @@ authorPubEdges <- function(keywords,pub_start_date,pub_end_date){
|
|
180 |
|
181 |
return(author_publication_edges)
|
182 |
|
183 |
-
|
184 |
}
|
|
|
3 |
keywords <- keywords
|
4 |
pub_start_date <- pub_start_date
|
5 |
pub_end_date <- pub_end_date
|
6 |
+
|
7 |
+
|
8 |
+
if(!is.character(keywords)) {
|
9 |
+
|
10 |
+
shinyalert(
|
11 |
+
title = "Error!",
|
12 |
+
text = "You can only enter text values",
|
13 |
+
closeOnEsc = T,
|
14 |
+
closeOnClickOutside = T,
|
15 |
+
confirmButtonText = "OK",
|
16 |
+
timer = 4000
|
17 |
+
)
|
18 |
+
} else {
|
19 |
+
# create search engine function
|
20 |
search_engine <- function(keywords,pub_start_date,pub_end_date){
|
21 |
suppressPackageStartupMessages(library(openalexR))
|
22 |
suppressPackageStartupMessages(library(tidyverse))
|
|
|
192 |
|
193 |
return(author_publication_edges)
|
194 |
|
195 |
+
}
|
196 |
}
|