## Not run:
# ## make sure you have signed up for a developer API key at http://www.factual.com/
#
# myAPIKey <- " ... YOUR Factual.com API KEY"
#
# factual <- createFactualConnection( myAPIKey )
#
# ## Skim http://www.factual.com/topics for an interesting table. Click the table's
# ## link and then click the "develop" tab. Note the "table reference."
# tableID <- "... table reference from the table's 'Develop' tab ..."
#
# ## now, let's get an idea of the table's schema and metadata:
# table.meta <- factualGetSchema( factual , tableID )
#
# str(table.meta)
#
# ## with that in mind, get the table's data
# table.data <- factualRead( factual , tableID )
#
# ## get an idea of the result object
# str(table.data)
#
# ## that's great, but we really want to play with the table data
# ## (it's a data frame)
# table.data@results
#
#
# ## hm, let's get 60 rows so we can explore
# table.data.small <- factualRead( factual , tableID , limit=60 )
#
# str(table.data.small@results)
#
#
# ## let's use some filters to limit the data we pull.
# ## pretend the table of interest has colums named "state"
# ## and "city"
# filters <- '{"city":"New York","state":"NY"}'
#
# table.data.filtered <- factualRead( factual , tableID , filters = filters )
# str(table.data.small@filtered)
# ## End(Not run)
Run the code above in your browser using DataLab