From the following xml code:
<?xml version = "1.0"?>
<Company >
<shareprice>
<timeStamp> 12:00:00.01</timeStamp>
<Price> 25.02</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:00.02</timeStamp>
<Price> 15</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.025</timeStamp>
<Price> 15.02</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.031</timeStamp>
<Price> 18.25</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.039</timeStamp>
<Price> 18.54</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:01.050</timeStamp>
<Price> 16.52</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:02.01</timeStamp>
<Price> 17.50</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:03.01</timeStamp>
<Price> 25.02</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:05.02</timeStamp>
<Price> 30</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:11.025</timeStamp>
<Price> 32.25</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:12.031</timeStamp>
<Price> 26.05</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:15.039</timeStamp>
<Price> 18.54</Price>
</shareprice>
<shareprice>
<timeStamp> 12:00:19.050</timeStamp>
<Price> 16.52</Price>
</shareprice>
<shareprice>
<timeStamp> 12:01:02.01</timeStamp>
<Price> 17.50</Price>
</shareprice>
</Company>
and using the following R code:
library(ggplot2)
library (XML)
test.df <- xmlToDataFrame(file.choose())
test.df
sapply(test.df, class)
test.df$timeStamp <- strptime(as.character(test.df$timeStamp), "%H:%M:%OS")
test.df$Price <- as.numeric(as.character(test.df$Price))
sapply(test.df, class)
options("digits.secs"=3)
summary (test.df)
with(test.df, plot(timeStamp, Price))
sd (test.df$Price)
mean(test.df$timeStamp)
test.df$timeStamp <- test.df[1,"timeStamp"] + cumsum(runif(7)*60)
summary(test.df)
qplot(timeStamp,Price,data=test.df,geom=c("point","line"))
Price <- summary(test.df$Price)
print (Price)
I would like to create an interactive graph that would allow a user to click on a point and get information on the the value of the point (eg if the value jumped a reason so), I would like to be able to put this interactive graph on a web page. It has been suggested to use GGOBI to do this, while others say it is possible to remain in R and use the rggobi library. As I have no experience of this I thought I'd ask for some pointers either directly or to a specific resource (one can spend years searching the net and not find anything)
Under the graph I would like to print out the summary of the Price. At the moment I run the code in a BATCH file on windows and it returns the graphs in a pdf file but not the summary print. Is there a way to set up the code / BATCH file so that it can produce the interactive graph and summary?