R not accepting xpath query

后端 未结 4 1349
不知归路
不知归路 2021-01-28 12:51

Hi I am using the XML package in R to scrape html pages. The page of interest is http://www.ncbi.nlm.nih.gov/protein/225903367?report=fasta and on that page there is a sequence

4条回答
  •  萌比男神i
    2021-01-28 13:53

    The problem is that the page is created dynamically using javascript, and the sequence is not visible in the rendering returned to R.

    The CRAN package "rentrez" provides an interface to eutils, which is the programmatic way to query Entrez

    library(rentrez)
    entrez_fetch(db="protein", id="225903367", rettype="fasta")
    

提交回复
热议问题