How to parse XML to R data frame

前端 未结 4 2190
离开以前
离开以前 2020-11-22 15:51

I tried to parse XML to R data frame, this link helped me a lot:

how to create an R data frame from a xml file

But still I was not able to figure out my prob

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 16:54

    You can try the code below:

    # Load the packages required to read XML files.
    library("XML")
    library("methods")
    
    # Convert the input xml file to a data frame.
    xmldataframe <- xmlToDataFrame("input.xml")
    print(xmldataframe)
    

提交回复
热议问题