Skip to content

Commit 69f764d

Browse files
committed
capture 'globalVar' tags in network data to fix #77
1 parent 8a57b80 commit 69f764d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: pkgstats
22
Title: Metrics of R Packages
3-
Version: 0.2.0.053
3+
Version: 0.2.0.054
44
Authors@R:
55
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

R/tag-data.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ tags_data <- function (path, has_tabs = NULL, pkg_name = NULL) {
103103
}
104104
}
105105

106-
fns_r <- tags_r [which (tags_r$kind == "function" & !is.na (tags_r$tag)), ]
106+
# Functions defined from namespaces of other packages are tagged as global variables.
107+
kinds <- c ("function", "globalVar")
108+
fns_r <- tags_r [which (tags_r$kind %in% kinds & !is.na (tags_r$tag)), ]
107109
fn_vars_r <- tags_r [which (tags_r$kind == "functionVar" &
108110
!is.na (tags_r$tag)), ]
109111

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/pkgstats",
99
"issueTracker": "https://github.com/ropensci-review-tools/pkgstats/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.2.0.053",
11+
"version": "0.2.0.054",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

0 commit comments

Comments
 (0)