/
scimetr_package.R
235 lines (223 loc) · 8.09 KB
/
scimetr_package.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# PENDIENTE:
# - Categorías dentro de misma área de investigación?
# - Categorías y áreas de investigación son por Sources?
# Otros:
# Número de ResearcherID e Identificador ORCID por autor
# Cargar etiquetas de campo (english...)
# Direcciones vacias which(!nzchar(wosdf$C1))
# Testear si hay fuentes duplicadas
# Definir clases de objetos: wos.bd
#' scimetr: Analysis of Scientific Publication Data with R
#'
#' This package implements tools for quantitative research in scientometrics and bibliometrics.
#' It provides routines for importing bibliographic data from
#' Thomson Reuters' Web of Knowledge (<https://www.webofknowledge.com>) and performing bibliometric analysis.
#' For more information visit <https://rubenfcasal.github.io/scimetr/articles/scimetr.html>.
#' @name scimetr-package
#' @aliases scimetr
#' @docType package
#' @import graphics
#' @import dplyr
#' @import ggplot2
#' @import stringr
#' @importFrom scales trans_breaks
#' @importFrom stats reorder median
#' @importFrom utils str read.delim setTxtProgressBar txtProgressBar
#' @importFrom grDevices dev.interactive devAskNewPage
#' @importFrom DBI dbConnect dbDisconnect dbListTables
#' @importFrom RSQLite SQLite
NULL
#' UDC WoS Core Collection 2015 data
#'
#' The data set consists of 856 registros vinculados a la UDC por el campo Organización-Nombre preferido
#' (Organization-Enhaced: OG = Universidade da Coruna)
#' de los siguientes índices de la Web of Science Core Collection:
#' \itemize{
#' \item{Science Citation Index Expanded (SCI-EXPANDED).}
#' \item{Social Sciences Citation Index (SSCI).}
#' \item{Arts & Humanities Citation Index (A&HCI).}
#' }
#' correspondientes al año 2015.
#' @name wosdf
#' @docType data
#' @format A data frame with 856 observations on the following 62 variables:
#' \describe{
#' \item{PT}{Publication type.}
#' \item{AU}{Author.}
#' \item{BA}{Book authors.}
#' \item{BE}{Editor.}
#' \item{GP}{Group author.}
#' \item{AF}{Author full.}
#' \item{BF}{Book authors fullname.}
#' \item{CA}{Corporate author.}
#' \item{TI}{Title.}
#' \item{SO}{Publication name.}
#' \item{SE}{Series title.}
#' \item{BS}{Book series.}
#' \item{LA}{Language.}
#' \item{DT}{Document type.}
#' \item{CT}{Conference title.}
#' \item{CY}{Conference year.}
#' \item{CL}{Conference place.}
#' \item{SP}{Conference sponsors.}
#' \item{HO}{Conference host.}
#' \item{DE}{Keywords.}
#' \item{ID}{Keywords Plus.}
#' \item{AB}{Abstract.}
#' \item{C1}{Addresses.}
#' \item{RP}{Reprint author.}
#' \item{EM}{Author email.}
#' \item{RI}{Researcher id numbers.}
#' \item{OI}{Orcid numbers.}
#' \item{FU}{Funding agency and grant number.}
#' \item{FX}{Funding text.}
#' \item{CR}{Cited references.}
#' \item{NR}{Number of cited references.}
#' \item{TC}{Times cited.}
#' \item{Z9}{Total times cited count .}
#' \item{U1}{Usage Count (Last 180 Days).}
#' \item{U2}{Usage Count (Since 2013).}
#' \item{PU}{Publisher.}
#' \item{PI}{Publisher city.}
#' \item{PA}{Publisher address.}
#' \item{SN}{ISSN.}
#' \item{EI}{eISSN.}
#' \item{BN}{ISBN.}
#' \item{J9}{Journal.ISI.}
#' \item{JI}{Journal.ISO.}
#' \item{PD}{Publication date.}
#' \item{PY}{Year published.}
#' \item{VL}{Volume.}
#' \item{IS}{Issue.}
#' \item{PN}{Part number.}
#' \item{SU}{Supplement.}
#' \item{SI}{Special issue.}
#' \item{MA}{Meeting abstract.}
#' \item{BP}{Beginning page.}
#' \item{EP}{Ending page.}
#' \item{AR}{Article number.}
#' \item{DI}{DOI.}
#' \item{D2}{Book DOI.}
#' \item{PG}{Page count.}
#' \item{WC}{WOS category.}
#' \item{SC}{Research areas.}
#' \item{GA}{Document delivery number.}
#' \item{UT}{Access number.}
#' \item{PM}{Pub Med ID.}
#' }
#' @source Thomson Reuters' Web of Science: \cr
#' \url{http://www.webofknowledge.com}.
#' @keywords datasets
# @examples
# str(wosdf)
NULL
#' Mathematics UDC WoS Core Collection 2008-2017 data
#'
#' The data set consists of 389 registros vinculados a la UDC por el campo Organización-Nombre preferido
#' (Organization-Enhaced: OG = Universidade da Coruna)
#' del área de investigación 'Mathematics' (Research areas: SC = \*Mathematics\*)
#' de los siguientes índices de la Web of Science Core Collection:
#' \itemize{
#' \item{Science Citation Index Expanded (SCI-EXPANDED).}
#' \item{Social Sciences Citation Index (SSCI).}
#' \item{Arts & Humanities Citation Index (A&HCI).}
#' }
#' correspondientes a los años 2008-2017.
#' @name wosdf2
#' @docType data
#' @format A data frame with 389 observations on the following 62 variables:
#' \describe{
#' \item{PT}{Publication type.}
#' \item{AU}{Author.}
#' \item{BA}{Book authors.}
#' \item{BE}{Editor.}
#' \item{GP}{Group author.}
#' \item{AF}{Author full.}
#' \item{BF}{Book authors fullname.}
#' \item{CA}{Corporate author.}
#' \item{TI}{Title.}
#' \item{SO}{Publication name.}
#' \item{SE}{Series title.}
#' \item{BS}{Book series.}
#' \item{LA}{Language.}
#' \item{DT}{Document type.}
#' \item{CT}{Conference title.}
#' \item{CY}{Conference year.}
#' \item{CL}{Conference place.}
#' \item{SP}{Conference sponsors.}
#' \item{HO}{Conference host.}
#' \item{DE}{Keywords.}
#' \item{ID}{Keywords Plus.}
#' \item{AB}{Abstract.}
#' \item{C1}{Addresses.}
#' \item{RP}{Reprint author.}
#' \item{EM}{Author email.}
#' \item{RI}{Researcher id numbers.}
#' \item{OI}{Orcid numbers.}
#' \item{FU}{Funding agency and grant number.}
#' \item{FX}{Funding text.}
#' \item{CR}{Cited references.}
#' \item{NR}{Number of cited references.}
#' \item{TC}{Times cited.}
#' \item{Z9}{Total times cited count .}
#' \item{U1}{Usage Count (Last 180 Days).}
#' \item{U2}{Usage Count (Since 2013).}
#' \item{PU}{Publisher.}
#' \item{PI}{Publisher city.}
#' \item{PA}{Publisher address.}
#' \item{SN}{ISSN.}
#' \item{EI}{eISSN.}
#' \item{BN}{ISBN.}
#' \item{J9}{Journal.ISI.}
#' \item{JI}{Journal.ISO.}
#' \item{PD}{Publication date.}
#' \item{PY}{Year published.}
#' \item{VL}{Volume.}
#' \item{IS}{Issue.}
#' \item{PN}{Part number.}
#' \item{SU}{Supplement.}
#' \item{SI}{Special issue.}
#' \item{MA}{Meeting abstract.}
#' \item{BP}{Beginning page.}
#' \item{EP}{Ending page.}
#' \item{AR}{Article number.}
#' \item{DI}{DOI.}
#' \item{D2}{Book DOI.}
#' \item{PG}{Page count.}
#' \item{WC}{WOS category.}
#' \item{SC}{Research areas.}
#' \item{GA}{Document delivery number.}
#' \item{UT}{Access number.}
#' \item{PM}{Pub Med ID.}
#' }
#' @source Thomson Reuters' Web of Science: \cr
#' \url{http://www.webofknowledge.com}.
#' @keywords datasets
# @examples
# str(wosdf)
NULL
## quiets concerns of R CMD check re: the .'s that appear in pipelines
if(getRversion() >= "2.15.1")
utils::globalVariables(c(".", "idd", "ida", "ids", "an", "Country",
"PT", "AU", "BA", "BE", "GP", "AF", "BF", "CA", "TI", "SO",
"SE", "BS", "LA", "DT", "CT", "CY", "CL", "SP", "HO", "DE", "ID",
"AB", "C1", "RP", "EM", "RI", "OI", "FU", "FX", "CR", "NR", "TC",
"Z9", "U1", "U2", "PU", "PI", "PA", "SN", "EI", "BN", "J9", "JI",
"PD", "PY", "VL", "IS", "PN", "SU", "SI", "MA", "BP", "EP", "AR",
"DI", "D2", "PG", "WC", "SC", "GA", "UT", "PM",
"ISS", "MC", "MP", "PC", "RD", "ST", "TD", "year",
"Types", "Documents", "Categories", "Areas", "Sources", "Journals",
"Countries", "Authors", "Years", ".wos.variable.labels"))
#--------------------------------------------------------------------
.onAttach <- function(libname, pkgname){
#--------------------------------------------------------------------
# pkg.info <- utils::packageDescription(pkgname, libname, fields = c("Title", "Version", "Date"))
pkg.info <- drop( read.dcf( file = system.file("DESCRIPTION", package = "scimetr"),
fields = c("Title", "Version", "Date") ))
packageStartupMessage(
paste0(" scimetr: ", pkg.info["Title"], ",\n"),
paste0(" version ", pkg.info["Version"], " (built on ", pkg.info["Date"], ").\n"),
paste0(" Copyright (C) UDC Rankings Group 2017-", format(as.Date(pkg.info["Date"]), "%Y"), ".\n"),
" Type `help(scimetr)` for an overview of the package or\n",
" visit https://rubenfcasal.github.io/scimetr.\n")
}