Regular expressions to create a data frame (XML)





<?xml version="1.0"?>
<!DOCTYPE temperatures SYSTEM "pointnemotemp.dtd">
<temperatures>
<variable>Mean TS from clear sky composite (kelvin)</variable>
<filename>ISCCPMonthly_avg.nc</filename>
<filepath>/usr/local/fer_dsets/data/</filepath>
<subset>93 points (TIME)</subset>
<longitude>123.8W(-123.8)</longitude>
<latitude>48.8S</latitude>
<case date="16-JAN-1994" temperature="278.9"/>
<case date="16-FEB-1994" temperature="280"/>
<case date="16-MAR-1994" temperature="278.9"/>
<case date="16-APR-1994" temperature="278.9"/>
</temperatures>


1) How can I read the xml in R using xmltreeparse or xml parse.


2)Using the regular expressions how can I create a data frame using date and temperature as variables. could you provide the whole syntax for both the questions if not a problem.


No comments:

Post a Comment