我需要从参考书目列表中提取期刊标题。标题都用引号括起来。那么有没有一种方法可以要求R提取括号内的所有文本?
我已经将列表作为文本文件读取到R中:
"data <- readLines("Publications _ CCDM.txt")“
下面是列表中的几行:
首页--期刊主要分类--期刊细介绍--期刊题录与文摘--期刊详细文摘内容(2020)。肉桂疫霉病的致病因子--肉桂疫霉菌的蛋白质组学验证和改造。bioRxiv。DOI:https://doi.org/10.1101/2020.10.25.354530 Beccari,G.,Prodi,A.,Senatore,M.T.,Balmas,V,.首页--期刊主要分类--期刊细介绍--期刊题录与文摘--期刊详细文摘内容Brocca,L.,Covarelli,L. (2020)。“种植面积会影响意大利硬粒小麦中真菌群落和次生代谢物的存在。”Toxins https://www.mdpi.com/2072-6651/12/2/97 Corsi,B.,Percvial Alwyn,L.,Downie,R.C.,Venturini,L.,Iagallo,E.M.,Campos Mantello,C.,McCormick-Barnes,C.,See,P.T.,Oliver,R.P.,Moffat,C.S.,Cockram,J.小麦对黄褐斑病菌ToxB真菌效应因子敏感性的遗传分析“理论与应用遗传学”https://doi.org/10.1007/s00122-019-03517-8德比希尔,M.C.,(2020)植物病原体中正选择压力的生物信息学检测:分子序列进化的中立理论。(2020)微生物学前沿。https://doi.org/10.3389/fmicb.2020.00644 Dodhia,K.N.,Cox,B.A.,奥利弗,R.P.,洛佩兹-鲁伊斯,F.J. (2020)。“当时间真的是金钱的时候:小麦病原菌Blumeria graminis f.sp.中的strobilurin抗性突变G143A的原位定量。”小麦草。“bioRxiv,doi:https://doi.org/10.1101/2020.08.20.258921 Graham-Taylor,C.,Kamphuis,L.G.,德比郡,M.C. (2020)。“对寄主范围广泛的植物病原真菌菌核菌基因组中次生代谢物生物合成簇的详细电子分析。”BMC基因组学https://doi.org/10.1186/s12864-019-6424-4
发布于 2020-11-21 16:10:58
尝试如下所示:
library(stringr)
str_extract_all(x, "“.*?”") %>% .[[1]] 如果您想从结果中删除引号,请在管道末尾添加以下内容:
str_remove_all("[“”]")输出:
[1] "Gene validation and remodelling using proteogenomics of Phytophthora cinnamomi, the causal agent of Dieback."
[2] "Cultivation Area Affects the Presence of Fungal Communities and Secondary Metabolites in Italian Durum Wheat Grains."
[3] "Genetic analysis of wheat sensitivity to the ToxB fungal effector from Pyrenophora tritici-repentis, the causal agent of tan spot"
[4] "When time really is money: in situ quantification of the strobilurin resistance mutation G143A in the wheat pathogen Blumeria graminis f. sp. tritici."
[5] "A detailed in silico analysis of secondary metabolite biosynthesis clusters in the genome of the broad host range plant pathogenic fungus Sclerotinia sclerotiorum."https://stackoverflow.com/questions/64940860
复制相似问题