Skip to contents

Parse the Authors@R field from a DESCRIPTION file into a person object

Usage

parse_authors_r(authors_r_string)

Arguments

authors_r_string

A character containing the Authors@R field from a DESCRIPTION file

Value

A person object, or a list of person objects of length equals to the length of authors_r_string

Examples

# Read from a DESCRIPTION file directly
pkg_description <- system.file("DESCRIPTION", package = "authoritative")
authors_r_pkg <- read.dcf(pkg_description, "Authors@R")

parse_authors_r(authors_r_pkg)
#> [1] "Hugo Gruson <hugo@data.org> [aut, cre, cph] (<https://orcid.org/0000-0002-4094-1476>)"

# Read from a database of CRAN metadata
cran_epidemiology_packages |>
  subset(!is.na(`Authors@R`), `Authors@R`, drop = TRUE) |>
  parse_authors_r() |>
  head()
#> [[1]]
#>  [1] "Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>)"                         
#>  [2] "Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)"
#>  [3] "Caitlin Collins [ctb]"                                                                   
#>  [4] "Roman Lustrik [ctb]"                                                                     
#>  [5] "Marie-Pauline Beugin [ctb]"                                                              
#>  [6] "Brian J. Knaus [ctb]"                                                                    
#>  [7] "Peter Solymos [ctb]"                                                                     
#>  [8] "Vladimir Mikryukov [ctb]"                                                                
#>  [9] "Klaus Schliep [ctb]"                                                                     
#> [10] "Tiago Maié [ctb]"                                                                        
#> [11] "Libor Morkovsky [ctb]"                                                                   
#> [12] "Ismail Ahmed [ctb]"                                                                      
#> [13] "Anne Cori [ctb]"                                                                         
#> [14] "Federico Calboli [ctb]"                                                                  
#> [15] "RJ Ewing [ctb]"                                                                          
#> [16] "Frédéric Michaud [ctb]"                                                                  
#> [17] "Rebecca DeCamp [ctb]"                                                                    
#> [18] "Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)"                      
#> 
#> [[2]]
#>  [1] "Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>)"                         
#>  [2] "Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)"
#>  [3] "Caitlin Collins [ctb]"                                                                   
#>  [4] "Roman Lustrik [ctb]"                                                                     
#>  [5] "Marie-Pauline Beugin [ctb]"                                                              
#>  [6] "Brian J. Knaus [ctb]"                                                                    
#>  [7] "Peter Solymos [ctb]"                                                                     
#>  [8] "Vladimir Mikryukov [ctb]"                                                                
#>  [9] "Klaus Schliep [ctb]"                                                                     
#> [10] "Tiago Maié [ctb]"                                                                        
#> [11] "Libor Morkovsky [ctb]"                                                                   
#> [12] "Ismail Ahmed [ctb]"                                                                      
#> [13] "Anne Cori [ctb]"                                                                         
#> [14] "Federico Calboli [ctb]"                                                                  
#> [15] "RJ Ewing [ctb]"                                                                          
#> [16] "Frédéric Michaud [ctb]"                                                                  
#> [17] "Rebecca DeCamp [ctb]"                                                                    
#> [18] "Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)"                      
#> 
#> [[3]]
#>  [1] "Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>)"                         
#>  [2] "Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)"
#>  [3] "Caitlin Collins [ctb]"                                                                   
#>  [4] "Roman Lustrik [ctb]"                                                                     
#>  [5] "Marie-Pauline Beugin [ctb]"                                                              
#>  [6] "Brian J. Knaus [ctb]"                                                                    
#>  [7] "Peter Solymos [ctb]"                                                                     
#>  [8] "Vladimir Mikryukov [ctb]"                                                                
#>  [9] "Klaus Schliep [ctb]"                                                                     
#> [10] "Tiago Maié [ctb]"                                                                        
#> [11] "Libor Morkovsky [ctb]"                                                                   
#> [12] "Ismail Ahmed [ctb]"                                                                      
#> [13] "Anne Cori [ctb]"                                                                         
#> [14] "Federico Calboli [ctb]"                                                                  
#> [15] "RJ Ewing [ctb]"                                                                          
#> [16] "Frédéric Michaud [ctb]"                                                                  
#> [17] "Rebecca DeCamp [ctb]"                                                                    
#> [18] "Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)"                      
#> 
#> [[4]]
#>  [1] "Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>)"                         
#>  [2] "Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)"
#>  [3] "Caitlin Collins [ctb]"                                                                   
#>  [4] "Roman Lustrik [ctb]"                                                                     
#>  [5] "Marie-Pauline Beugin [ctb]"                                                              
#>  [6] "Brian J. Knaus [ctb]"                                                                    
#>  [7] "Peter Solymos [ctb]"                                                                     
#>  [8] "Vladimir Mikryukov [ctb]"                                                                
#>  [9] "Klaus Schliep [ctb]"                                                                     
#> [10] "Tiago Maié [ctb]"                                                                        
#> [11] "Libor Morkovsky [ctb]"                                                                   
#> [12] "Ismail Ahmed [ctb]"                                                                      
#> [13] "Anne Cori [ctb]"                                                                         
#> [14] "Federico Calboli [ctb]"                                                                  
#> [15] "RJ Ewing [ctb]"                                                                          
#> [16] "Frédéric Michaud [ctb]"                                                                  
#> [17] "Rebecca DeCamp [ctb]"                                                                    
#> [18] "Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)"                      
#> [19] "Lindsay V. Clark [ctb] (<https://orcid.org/0000-0002-3881-9252>)"                        
#> [20] "Pavel Dimens [ctb] (<https://orcid.org/0000-0003-3823-0373>)"                            
#> 
#> [[5]]
#>  [1] "Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>)"                         
#>  [2] "Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)"
#>  [3] "Caitlin Collins [ctb]"                                                                   
#>  [4] "Roman Lustrik [ctb]"                                                                     
#>  [5] "Marie-Pauline Beugin [ctb]"                                                              
#>  [6] "Brian J. Knaus [ctb]"                                                                    
#>  [7] "Peter Solymos [ctb]"                                                                     
#>  [8] "Vladimir Mikryukov [ctb]"                                                                
#>  [9] "Klaus Schliep [ctb]"                                                                     
#> [10] "Tiago Maié [ctb]"                                                                        
#> [11] "Libor Morkovsky [ctb]"                                                                   
#> [12] "Ismail Ahmed [ctb]"                                                                      
#> [13] "Anne Cori [ctb]"                                                                         
#> [14] "Federico Calboli [ctb]"                                                                  
#> [15] "RJ Ewing [ctb]"                                                                          
#> [16] "Frédéric Michaud [ctb]"                                                                  
#> [17] "Rebecca DeCamp [ctb]"                                                                    
#> [18] "Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)"                      
#> [19] "Lindsay V. Clark [ctb] (<https://orcid.org/0000-0002-3881-9252>)"                        
#> [20] "Pavel Dimens [ctb] (<https://orcid.org/0000-0003-3823-0373>)"                            
#> 
#> [[6]]
#>  [1] "Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>)"                         
#>  [2] "Zhian N. Kamvar <zkamvar@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-1458-7108>)"
#>  [3] "Caitlin Collins [ctb]"                                                                   
#>  [4] "Roman Lustrik [ctb]"                                                                     
#>  [5] "Marie-Pauline Beugin [ctb]"                                                              
#>  [6] "Brian J. Knaus [ctb]"                                                                    
#>  [7] "Peter Solymos [ctb]"                                                                     
#>  [8] "Vladimir Mikryukov [ctb]"                                                                
#>  [9] "Klaus Schliep [ctb]"                                                                     
#> [10] "Tiago Maié [ctb]"                                                                        
#> [11] "Libor Morkovsky [ctb]"                                                                   
#> [12] "Ismail Ahmed [ctb]"                                                                      
#> [13] "Anne Cori [ctb]"                                                                         
#> [14] "Federico Calboli [ctb]"                                                                  
#> [15] "RJ Ewing [ctb]"                                                                          
#> [16] "Frédéric Michaud [ctb]"                                                                  
#> [17] "Rebecca DeCamp [ctb]"                                                                    
#> [18] "Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)"                      
#> [19] "Lindsay V. Clark [ctb] (<https://orcid.org/0000-0002-3881-9252>)"                        
#> [20] "Pavel Dimens [ctb] (<https://orcid.org/0000-0003-3823-0373>)"                            
#>