## Not run:
# d <- SPARQL(url="http://services.data.gov.uk/reference/sparql",
# query="SELECT * WHERE { ?s ?p ?o . } LIMIT 10",
# ns=c('time','<http://www.w3.org/2006/time#>'))
#
# is.data.frame(d$results)
#
# # draw a pie chart from data from the Linked Open Piracy data set
# endpoint <- "http://semanticweb.cs.vu.nl/lop/sparql/"
# q <-
# "SELECT *
# WHERE {
# ?event sem:hasPlace ?place .
# ?place eez:inPiracyRegion ?region .
# } LIMIT 20"
# prefix <- c("lop","http://semanticweb.cs.vu.nl/poseidon/ns/instances/",
# "eez","http://semanticweb.cs.vu.nl/poseidon/ns/eez/")
# res <- SPARQL(endpoint,q,prefix)$results
# pie(sort(table(res$region)),col=rainbow(12))
# ## End(Not run)
Run the code above in your browser using DataLab