I'm using the rscopus
package to get data frames for multiple individuals from the Scopus API. To do this I use the author_df
function for each individual, then use bind_rows
to bind them all together. Sample code is below:
library(rscopus)
library(dplyr)
Elsevier_API = "XXX"
set_api_key(Elsevier_API)
#pull author data frames
df1 = author_df(au_id = "35392031000", verbose = FALSE, general = FALSE)
df2 = author_df(au_id = "35418453700", verbose = FALSE, general = FALSE)
#bind dfs
df_final = bind_rows(df1,df2)
This works fine but I do have a list of author ids (au_id
in the above code), and would like to be able to set up a function to loop over this list (and eliminate the need for me to manually add new individuals to the script.)
Unfortunately the Scopus API requires an ID key so this will not be reproducible unless you have/register for one.
I'm fairly new to R and coding in general so any help would be greatly appreciated.
Thanks!