mapAuthorToDOI: Map Author to Digital Object Identifier (DOI)

Description Usage Arguments Value Author(s) Examples

View source: R/mapAuthorToDOI.R

Description

Maps the groups to the corresponding DOI values

Usage

1
mapAuthorToDOI(groups, markRelevant = FALSE, marking.symbol = "*")

Arguments

groups

Result based on the igraph calculation with walktrap.community(g)

markRelevant

If TRUE, all authors who have an abstract will get a * behind the citations name

marking.symbol

This can be used to change the Symbol which gets appended to the citationname when markRevelant is TRUE

Value

A multidimensional List: [1] group [2] citation [3] DOI or "" if no DOI was found [4] Abstract if there

Author(s)

MFinst

Examples

 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
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (groups, markRelevant = FALSE, marking.symbol = "*")
{
    result = vector(mode = "character", length = 0)
    for (i in 1:length(groups)) {
        authors = groups[[i]]
        group = vector(mode = "character", length = 0)
        for (y in 1:length(authors)) {
            DOI = ""
            if (!is.na(dd$B_DOI[dd$B == authors[y]][1])) {
                DOI = dd$B_DOI[dd$B == authors[y]][1]
            }
            else if (!is.na(dd$A_DOI[dd$A == authors[y]][1])) {
                DOI = dd$A_DOI[dd$A == authors[y]][1]
            }
            abstract = WoK_extracted$AB[WoK_extracted$DI == trimws(as.character(DOI[[1]]))]
            author = authors[y]
            if (length(abstract) == 0) {
                abstract = ""
            }
            else if (is.na(trimws(as.character(abstract)))) {
                abstract = ""
            }
            else if (markRelevant) {
                author = paste(marking.symbol, author, sep = "")
            }
            row = c(i, author, as.character(DOI[[1]]), as.character(abstract))
            group = rbind(group, row)
        }
        result = rbind(result, group)
    }
    return(result)
  }

mfinst/TM-CoCit-Support-FM documentation built on March 4, 2020, 8:38 p.m.