<html>
<title>R Dataset Explorer</title>
<head>
<body>
<h3>R Dataset Explorer with Rook</h3>
<p>
This example demonstrates Rook by exploring the R datasets package. Each dataset is presented below. By clicking on one, you will be able to explore the dataset with a plot or by returning the dataset in its entirety as a JSON object.
</p>
<table><tr>
<% 
counter <- 0
numcols <- 6
for (i in sort(ls('package:datasets'))){ 
	if (counter %% numcols == 0) cat("</tr><tr>")
%>
<td>
    <a href="<%=req$to_url('/dataset.html',data=i)%>"><%=i%></a>
    [ <a href="<%=req$to_url(paste('/',i,'.json',sep=''))%>">json</a>]
    [ <a href="<%=req$to_url(paste('/',i,'.png',sep=''))%>">png</a>]
</td>
<%
	counter <- counter + 1;
}
%>
</tr></table>
</body>
</html>
