ropensci / openalexR

Getting bibliographic records from OpenAlex
https://docs.ropensci.org/openalexR/
Other
89 stars 19 forks source link

Using oa_fetch to search for more than 100 dois #195

Closed KirstenElliott closed 6 months ago

KirstenElliott commented 6 months ago

I'd like to search for a large set of DOIs using oa_fetch. I've used the DOI works filter successfully for 100 records, but if I try to increase it to 200 it doesn't run. It stalls with the message "Session suspend timeout paused: A child process is running Incomplete command prompt entered Waiting for event console_input" . I've tested the 2 sets of 100 separately and both run when not combined, so I don't think there's an error in either block.

I'm using OpenAlexR version 1.2.3 in RStudio.

Is it possible to search for this many DOIs in oa_fetch? If so, what am I doing wrong? I'm very new to R so might be missing something obvious, TYIA!

The query is: works_from_dois <- oa_fetch( entity = "works", doi = c("10.1093/icc/dtz003","10.1017/S0898030616000373","10.1016/j.annals.2015.08.001","10.1017/S0021911819000561","10.1177/0392192113520095","10.1080/00131911.2019.1522042","10.12759/hsr.41.2016.1.91-110","10.1017/jbr.2018.116","10.1093/hwj/dby013","10.1353/shb.2014.0009","10.1007/s10479-017-2574-4","10.1103/PhysRevLett.115.031301","10.1111/gove.12461","10.1558/cam.16692","10.1386/stic.8.2.135_1","10.1080/14753820.2019.1654266","10.1080/14608944.2015.1136609","10.1080/1369118x.2019.1668454","10.1111/1468-229X.12106","10.1080/03004279.2015.1020660","10.1111/1467-9248.12210","10.1080/2159676X.2017.1377756","10.1108/IJSE-09-2015-0232","10.1111/1467-9566.12739","10.1080/00220388.2015.1081174","10.1080/2159676x.2018.1561500","10.1177/1468017315572037","10.1177/2049463718804572","10.1111/ecc.12137","10.1177/0018726720908663","10.1017/lst.2018.6","10.1177/1749602017698158","10.1177/1462474514560186","10.14426/cristal.v3i2.52","10.1080/17508487.2014.863221","10.1177/1367549417722107","10.1016/j.ijnurstu.2020.103589","10.1093/fh/cry065","10.4324/9781315626628","10.1017/S0922156519000049","10.1017/S0026749X14000080","10.1111/1468-0424.12491","10.1177/0261018316643949","10.1093/tcbh/hwz046","10.1093/gbe/evw077","10.3390/arts9010039","10.1017/S0047404515000792","10.1016/j.childyouth.2019.02.029","10.4000/chs.1714","10.1002/symb.99","10.1080/24694452.2019.1630247","10.1080/09608788.2020.1750348","10.1093/dh/dht131","10.1017/S0021875816000979","10.1080/09612025.2018.1457126","10.13135/2281-6658/989","10.1353/cal.2014.0181","10.1145/2818048.2819992","10.1080/17450918.2018.1553891","10.1353/cal.2016.0042","10.1080/08838151.2016.1273930","10.1016/j.erss.2019.101340","10.1007/s11412-015-9209-z","10.1109/tpel.2019.2952633","10.1016/j.ijpharm.2018.01.024","10.1002/admt.201700134","10.1016/j.jconrel.2017.06.025","10.1002/adma.201800159","10.1021/acsami.9b01472","10.1021/acsami.5b10471","10.1016/j.jconrel.2015.09.028","10.1016/j.ijpharm.2015.07.067","10.1016/j.ijpharm.2017.06.085","10.1039/c7tc02412f","10.1016/j.molcel.2016.10.009","10.1016/j.matdes.2017.10.070","10.1093/jac/dkw482","10.1523/JNEUROSCI.3047-14.2015","10.1088/0004-637x/785/1/44","10.1111/pbi.12181","10.1371/journal.pcbi.1005794","10.1007/s11242-018-1094-2","10.4171/IFB/362","10.3310/hta23580","10.1186/s13287-018-0789-1","10.1080/07350015.2017.1385467","10.1016/S2215-0366(17)30129-3","10.1016/j.ijfatigue.2018.03.032","10.1162/EVCO_a_00145","10.3168/jds.2013-7174","10.1096/fj.13-241760","10.1016/j.vaa.2017.01.001","10.1016/j.rbmo.2015.06.017","10.1002/adma.201905200","10.1038/leu.2014.319","10.1017/S0007123416000570","10.1007/s11104-020-04530-3","10.1016/S0140-6736(15)00947-2","10.1016/j.afos.2019.09.001","10.1007/s00787-017-1054-3","10.18632/aging.101861","10.1016/j.postharvbio.2017.10.017","10.1039/c5cp05326a","10.1016/j.renene.2018.06.075","10.1016/j.applthermaleng.2017.02.060","10.3389/fgene.2014.00190","10.1098/rspa.2013.0771","10.1016/j.compstruct.2019.03.084","10.1107/s1600577519003448","10.1242/dev.172411","10.1080/09647775.2019.1573700","10.1177/0163443714560134","10.1017/jfm.2019.273","10.1109/JESTPE.2019.2942714","10.1017/S0020589315000457","10.1016/j.biomaterials.2015.05.019","10.1073/pnas.1503362112","10.1214/14-AAP1066","10.1109/tfuzz.2017.2699168","10.1613/jair.5098","10.1016/j.ymssp.2017.01.021","10.7554/eLife.56474","10.1128/JVI.02700-15","10.1109/TCYB.2013.2249063","10.1109/TCYB.2014.2323936","10.1111/add.14476","10.1007/s10551-017-3659-3","10.1016/j.ymssp.2020.106802","10.1109/TIE.2017.2694378","10.1145/2674377.2674383","10.2196/11677","10.1057/s41305-018-0103-1","10.1038/ncomms7043","10.1038/nchembio.2394","10.1093/hrlr/ngy032","10.1109/TPAMI.2017.2745568","10.1038/s41589-019-0438-8","10.4064/sm170907-23-2","10.1038/s41598-017-12200-1","10.1016/j.isci.2020.101237","10.1038/s41467-020-14941-6","10.1080/01621459.2019.1585253","10.1038/srep22208","10.3310/hta23160","10.1126/sciadv.aav8391","10.1016/j.chb.2015.02.005","10.1016/j.jcp.2016.08.002","10.1109/JESTPE.2015.2503125","10.1016/j.tust.2016.12.004","10.1016/j.micromeso.2015.03.001","10.1038/s41467-020-15638-6","10.1016/j.ress.2018.07.004","10.1007/s10346-018-1023-z","10.1016/j.quascirev.2018.09.006","10.1109/JESTPE.2018.2861326","10.1109/TEVC.2017.2785346","10.1016/j.jbiomech.2017.01.028","10.1080/03085694.2014.947850","10.1080/00220620.2017.1315381","10.1016/j.neuroimage.2020.116976","10.1115/1.4045037","10.1038/s41467-020-18139-8","10.3847/0004-637X/816/2/83","10.1016/j.msea.2016.06.013","10.1038/s41467-018-03851-3","10.1136/gutjnl-2015-309122","10.1016/j.polymdegradstab.2016.06.018","10.1371/journal.pone.0188581","10.1086/682885","10.1128/IAI.00307-18","10.1016/j.ress.2017.02.012","10.1109/TEVC.2015.2457437","10.1109/TIE.2018.2835372","10.1039/c5sc03111g","10.1016/j.ijindorg.2019.102563","10.1111/1467-9566.12560","10.1016/j.neuroimage.2016.02.045","10.1016/j.ijpe.2016.06.019","10.1017/S1446181118000044","10.1038/s41586-020-2940-2","10.1016/j.cub.2017.07.062","10.1371/journal.pone.0174202","10.1371/journal.pbio.1002034","10.1016/j.neuroimage.2017.01.034","10.1680/geot.SIP.15.P.020","10.1038/nchembio.1593","10.1016/j.ins.2018.04.029","10.1371/journal.pbio.2002978","10.1016/j.chembiol.2016.03.014","10.1038/ncomms9670","10.1016/j.cub.2017.04.022","10.1109/tie.2019.2914616","10.1016/j.apenergy.2016.06.029","10.1182/blood-2015-10-676122","10.1016/j.applthermaleng.2018.01.005","10.1096/fj.201600773R","10.2147/IJN.S216667","10.3390/app9193948","10.1002/macp.201300787","10.1016/j.finel.2019.103347"), verbose = TRUE

)

rkrug commented 6 months ago

Works for me

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.2.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Zurich
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] openalexR_1.2.3

loaded via a namespace (and not attached):
 [1] utf8_1.2.4        R6_2.5.1          magrittr_2.0.3    glue_1.6.2
 [5] tibble_3.2.1      pkgconfig_2.0.3   lifecycle_1.0.4   cli_3.6.2
 [9] fansi_1.0.5       vctrs_0.6.5       compiler_4.3.2    prettyunits_1.2.0
[13] httr_1.4.7        curl_5.2.0        hms_1.1.3         pillar_1.9.0
[17] rlang_1.1.2       jsonlite_1.8.8    crayon_1.5.2      progress_1.2.2
>

with the following code (reformatted):

works_from_dois <- oa_fetch(
entity = "works",
doi = c(
"10.1093/icc/dtz003",
"10.1017/S0898030616000373",
"10.1016/j.annals.2015.08.001",
"10.1017/S0021911819000561",
"10.1177/0392192113520095",
"10.1080/00131911.2019.1522042",
"10.12759/hsr.41.2016.1.91-110",
"10.1017/jbr.2018.116",
"10.1093/hwj/dby013",
"10.1353/shb.2014.0009",
"10.1007/s10479-017-2574-4",
"10.1103/PhysRevLett.115.031301",
"10.1111/gove.12461",
"10.1558/cam.16692",
"10.1386/stic.8.2.135_1",
"10.1080/14753820.2019.1654266",
"10.1080/14608944.2015.1136609",
"10.1080/1369118x.2019.1668454",
"10.1111/1468-229X.12106",
"10.1080/03004279.2015.1020660",
"10.1111/1467-9248.12210",
"10.1080/2159676X.2017.1377756",
"10.1108/IJSE-09-2015-0232",
"10.1111/1467-9566.12739",
"10.1080/00220388.2015.1081174",
"10.1080/2159676x.2018.1561500",
"10.1177/1468017315572037",
"10.1177/2049463718804572",
"10.1111/ecc.12137",
"10.1177/0018726720908663",
"10.1017/lst.2018.6",
"10.1177/1749602017698158",
"10.1177/1462474514560186",
"10.14426/cristal.v3i2.52",
"10.1080/17508487.2014.863221",
"10.1177/1367549417722107",
"10.1016/j.ijnurstu.2020.103589",
"10.1093/fh/cry065",
"10.4324/9781315626628",
"10.1017/S0922156519000049",
"10.1017/S0026749X14000080",
"10.1111/1468-0424.12491",
"10.1177/0261018316643949",
"10.1093/tcbh/hwz046",
"10.1093/gbe/evw077",
"10.3390/arts9010039",
"10.1017/S0047404515000792",
"10.1016/j.childyouth.2019.02.029",
"10.4000/chs.1714",
"10.1002/symb.99",
"10.1080/24694452.2019.1630247",
"10.1080/09608788.2020.1750348",
"10.1093/dh/dht131",
"10.1017/S0021875816000979",
"10.1080/09612025.2018.1457126",
"10.13135/2281-6658/989",
"10.1353/cal.2014.0181",
"10.1145/2818048.2819992",
"10.1080/17450918.2018.1553891",
"10.1353/cal.2016.0042",
"10.1080/08838151.2016.1273930",
"10.1016/j.erss.2019.101340",
"10.1007/s11412-015-9209-z",
"10.1109/tpel.2019.2952633",
"10.1016/j.ijpharm.2018.01.024",
"10.1002/admt.201700134",
"10.1016/j.jconrel.2017.06.025",
"10.1002/adma.201800159",
"10.1021/acsami.9b01472",
"10.1021/acsami.5b10471",
"10.1016/j.jconrel.2015.09.028",
"10.1016/j.ijpharm.2015.07.067",
"10.1016/j.ijpharm.2017.06.085",
"10.1039/c7tc02412f",
"10.1016/j.molcel.2016.10.009",
"10.1016/j.matdes.2017.10.070",
"10.1093/jac/dkw482",
"10.1523/JNEUROSCI.3047-14.2015",
"10.1088/0004-637x/785/1/44",
"10.1111/pbi.12181",
"10.1371/journal.pcbi.1005794",
"10.1007/s11242-018-1094-2",
"10.4171/IFB/362",
"10.3310/hta23580",
"10.1186/s13287-018-0789-1",
"10.1080/07350015.2017.1385467",
"10.1016/S2215-0366(17)30129-3",
"10.1016/j.ijfatigue.2018.03.032",
"10.1162/EVCO_a_00145",
"10.3168/jds.2013-7174",
"10.1096/fj.13-241760",
"10.1016/j.vaa.2017.01.001",
"10.1016/j.rbmo.2015.06.017",
"10.1002/adma.201905200",
"10.1038/leu.2014.319",
"10.1017/S0007123416000570",
"10.1007/s11104-020-04530-3",
"10.1016/S0140-6736(15)00947-2",
"10.1016/j.afos.2019.09.001",
"10.1007/s00787-017-1054-3",
"10.18632/aging.101861",
"10.1016/j.postharvbio.2017.10.017",
"10.1039/c5cp05326a",
"10.1016/j.renene.2018.06.075",
"10.1016/j.applthermaleng.2017.02.060",
"10.3389/fgene.2014.00190",
"10.1098/rspa.2013.0771",
"10.1016/j.compstruct.2019.03.084",
"10.1107/s1600577519003448",
"10.1242/dev.172411",
"10.1080/09647775.2019.1573700",
"10.1177/0163443714560134",
"10.1017/jfm.2019.273",
"10.1109/JESTPE.2019.2942714",
"10.1017/S0020589315000457",
"10.1016/j.biomaterials.2015.05.019",
"10.1073/pnas.1503362112",
"10.1214/14-AAP1066",
"10.1109/tfuzz.2017.2699168",
"10.1613/jair.5098",
"10.1016/j.ymssp.2017.01.021",
"10.7554/eLife.56474",
"10.1128/JVI.02700-15",
"10.1109/TCYB.2013.2249063",
"10.1109/TCYB.2014.2323936",
"10.1111/add.14476",
"10.1007/s10551-017-3659-3",
"10.1016/j.ymssp.2020.106802",
"10.1109/TIE.2017.2694378",
"10.1145/2674377.2674383",
"10.2196/11677",
"10.1057/s41305-018-0103-1",
"10.1038/ncomms7043",
"10.1038/nchembio.2394",
"10.1093/hrlr/ngy032",
"10.1109/TPAMI.2017.2745568",
"10.1038/s41589-019-0438-8",
"10.4064/sm170907-23-2",
"10.1038/s41598-017-12200-1",
"10.1016/j.isci.2020.101237",
"10.1038/s41467-020-14941-6",
"10.1080/01621459.2019.1585253",
"10.1038/srep22208",
"10.3310/hta23160",
"10.1126/sciadv.aav8391",
"10.1016/j.chb.2015.02.005",
"10.1016/j.jcp.2016.08.002",
"10.1109/JESTPE.2015.2503125",
"10.1016/j.tust.2016.12.004",
"10.1016/j.micromeso.2015.03.001",
"10.1038/s41467-020-15638-6",
"10.1016/j.ress.2018.07.004",
"10.1007/s10346-018-1023-z",
"10.1016/j.quascirev.2018.09.006",
"10.1109/JESTPE.2018.2861326",
"10.1109/TEVC.2017.2785346",
"10.1016/j.jbiomech.2017.01.028",
"10.1080/03085694.2014.947850",
"10.1080/00220620.2017.1315381",
"10.1016/j.neuroimage.2020.116976",
"10.1115/1.4045037",
"10.1038/s41467-020-18139-8",
"10.3847/0004-637X/816/2/83",
"10.1016/j.msea.2016.06.013",
"10.1038/s41467-018-03851-3",
"10.1136/gutjnl-2015-309122",
"10.1016/j.polymdegradstab.2016.06.018",
"10.1371/journal.pone.0188581",
"10.1086/682885",
"10.1128/IAI.00307-18",
"10.1016/j.ress.2017.02.012",
"10.1109/TEVC.2015.2457437",
"10.1109/TIE.2018.2835372",
"10.1039/c5sc03111g",
"10.1016/j.ijindorg.2019.102563",
"10.1111/1467-9566.12560",
"10.1016/j.neuroimage.2016.02.045",
"10.1016/j.ijpe.2016.06.019",
"10.1017/S1446181118000044",
"10.1038/s41586-020-2940-2",
"10.1016/j.cub.2017.07.062",
"10.1371/journal.pone.0174202",
"10.1371/journal.pbio.1002034",
"10.1016/j.neuroimage.2017.01.034",
"10.1680/geot.SIP.15.P.020",
"10.1038/nchembio.1593",
"10.1016/j.ins.2018.04.029",
"10.1371/journal.pbio.2002978",
"10.1016/j.chembiol.2016.03.014",
"10.1038/ncomms9670",
"10.1016/j.cub.2017.04.022",
"10.1109/tie.2019.2914616",
"10.1016/j.apenergy.2016.06.029",
"10.1182/blood-2015-10-676122",
"10.1016/j.applthermaleng.2018.01.005",
"10.1096/fj.201600773R",
"10.2147/IJN.S216667",
"10.3390/app9193948",
"10.1002/macp.201300787",
"10.1016/j.finel.2019.103347"
),
verbose = TRUE,
api_key = ""
)
KirstenElliott commented 6 months ago

Thank you very much for checking! I've tested again with the reformatted code and it is now working for me.