Skip to content

Extract author's affilliation(s) from their last publication to speed up your new manuscript writing

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

Benjamin-Valderrama/aFILLiator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aFILLiator

aFILLiator is a small collection of scripts that find the affiliation of an author by looking at the affiliation they used in their last paper available in PubMed. The goal is to help authors to find the affiliations of their collaborators, thus speeding up the writing process of this tedious (but necessary) section.

Installation

You can install the development version of aFILLiator from GitHub with:

# install.packages("devtools")
devtools::install_github("Benjamin-Valderrama/aFILLiator")

Example

This is a basic example which shows you how aFILLiator works…

library(aFILLiator)

# we call the main function of aFILLiator
aFILLiator(fore_name = "Benjamin", last_name = "Valderrama")
#> [1] "Benjamin Valderrama"
#> [1] "Entrez search result with 1 hits"
#> [1] "Extracting affiliations from the article : 38525261 (PMID)"
#>       name  last_name
#> 1 Benjamin Valderrama
#>                                                                   affiliations
#> 1 APC Microbiome Ireland, University College Cork, Cork, County Cork, Ireland.
#>   extracted_from_pmid
#> 1            38525261

In addition, aFILLiator can be used to gather information from multiple authors. To do so, a data frame with two columns can be generated and imported into your R session. Below you can see an example of such a data frame. Notice the two columns, one with the forenames (fore_name), and other with the last names (last_name) of each author.

# Example data frame
test_df
#>   fore_name    last_name
#> 1    Thomaz Bastiaanssen
#> 2  Benjamin   Valderrama
#> 3    John F        Cryan

The data frame with the names can then be transformed into an object of class list, and we can use the function aFILLiator to loop over matching pairs of fore_names and last_names.

library(aFILLiator)

# convert to a list to loop over it
names_list <- test_df |> 
        as.list()

# loop over the matching forenames and last names using the aFILLliator function
affiliations_df <- mapply(aFILLiator, names_list$fore_name, names_list$last_name) |>
        t() |>
        data.frame() |>
        # make the output a data frame again
        sapply(X = _, FUN = unlist) |>
        data.frame()

#> [1] "Thomaz Bastiaanssen"
#> [1] "Entrez search result with 23 hits"
#> [1] "Extracting affiliations from the article : 38852762 (PMID)"
#> [1] "Benjamin Valderrama"
#> [1] "Entrez search result with 1 hits"
#> [1] "Extracting affiliations from the article : 38525261 (PMID)"
#> [1] "John F Cryan"
#> [1] "Entrez search result with 89 hits"
#> [1] "Extracting affiliations from the article : 38852762 (PMID)"


# see the output
affiliations_df

#>              name    last_name
#> Thomaz     Thomaz Bastiaanssen
#> Benjamin Benjamin   Valderrama
#> John F     John F        Cryan
#>                                                                                                                                                                                            affiliations
#> Thomaz                                       APC Microbiome Ireland, University College Cork, Cork T12YT20, Ireland; Dept. of Anatomy and Neuroscience, University College Cork, Cork T12YT20, Ireland.
#> Benjamin                                                                                                                   APC Microbiome Ireland, University College Cork, Cork, County Cork, Ireland.
#> John F   APC Microbiome Ireland, University College Cork, Cork T12YT20, Ireland; Dept. of Anatomy and Neuroscience, University College Cork, Cork T12YT20, Ireland. Electronic address: J.Cryan@ucc.ie.
#>          extracted_from_pmid
#> Thomaz              38852762
#> Benjamin            38525261
#> John F              38852762

About

Extract author's affilliation(s) from their last publication to speed up your new manuscript writing

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages