## Not run: 
#   ## query for the first 1000 Files found, returning results as a data.frame
#   df <- synQuery("select id, name, parentId from file limit 1000")
# 
# 
#   ## get a QueryResult object back from a query
#   qr <- synQuery("select id, name, parentId from file limit 1000", blockSize=100)
# 
#   ## get a data.frame with 100 results
#   df <- qr$fetch()
# 
#   ## accumulate the next 300 results
#   df <- qr$collect()
#   df <- qr$collect()
#   df <- qr$collect()
# 
#   ## accumulate the remaining results.
#   ## df will be a data.frame with 1000 accumulated rows
#   df <- qr$collectAll()
# ## End(Not run)
Run the code above in your browser using DataLab