dj_fetch: Get datajoint table

View source: R/dj_fetch.R

dj_fetchR Documentation

Get datajoint table

Description

Fetches data from a datajoint table, returns as a list or whatever format is returned from the callback.

Usage

dj_fetch(
  sch = NULL,
  tbl = NULL,
  restrictions = NULL,
  query = NULL,
  keys = NULL,
  format = "dict",
  callback = NULL,
  add_vars = list(),
  ...
)

Arguments

sch

the names of the schema(s) used to fetch. Must be used in combination with tbl or query. If providing tbl, sch should be a string. If providing query, sch should consist of all schemas used in the query. Can be a string or a vector if multiple schemas are used.

tbl

the table to fetch. Must specify either (sch and tbl) or query

restrictions

a vector of strings containing restrictions. See details. Only used with sch and tbl

query

a python datajoint query as a string. Must specify either (sch and tbl) or sch and query

keys

a list of keys to fetch. If NULL, fetches the whole table as dict or data.frame (see format)

format

string; format to fetch data. either "dict" for dictionary or "df" for data.frame

callback

a callback function to process data returned from the query

add_vars

a list of additional variables to add to the data, optional

...

additional arguments passed to callback

Value

if callback is specified, data is returned in the form of the callback's return. otherwise, returns data fetched from datajoint table as a list.


gkane26/djreadr documentation built on April 3, 2022, 8:57 a.m.