This topic is under construction.

Any of these example R reports can be run in an R client, like RStudio, for testing purposes.

Select Rows

library(Rlabkey)
labkey.data <- labkey.selectRows(
baseUrl="https://www.labkey.org",
folderPath="/Explore/Research Study",
schemaName="study",
queryName="Demographics",
viewName="",
colSelect="ParticipantId,date,cohort,height,Language",
colFilter=NULL,
containerFilter=NULL,
colNameOpt="rname"
)

Traverse the Lookup Column 'Language'

If the column 'Language' is a lookup, you can access other columns in the 'looked up' table as follows. Also useful for controlling the display column, when the 'looked up' table has an integer key.

library(Rlabkey)
labkey.data <- labkey.selectRows(
baseUrl="https://www.labkey.org",
folderPath="/Explore/Research Study",
schemaName="study",
queryName="Demographics",
viewName="",
colSelect="ParticipantId,date,cohort,height,Language,Language/LanguageName,Language/TranslatorName,Language/TranslatorPhone",
colFilter=NULL,
containerFilter=NULL,
colNameOpt="rname"
)

Discussion

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand all collapse all