Skip to content
Ben Tupper edited this page Jul 1, 2015 · 5 revisions

Researchers

Most of the time Researchers should be managed through the GUI. Usually we only need programmatic control of Researcher resources to verify that a user listed as a technician for an instrument is properly listed and to grab an email when alert a particular user.

Getting a list of Researchers
lims <- Lims("~/.clarityrc')

# get a data.frame of users
r <- lims$get_researchers()
r
                                name      username initials                  email
admin           System Administrator         admin      SA1                          
facility      Facility Administrator      facility      FA1                          
apiuser                   API Access       apiuser      API                          
cslewis                     CS Lewis       cslewis      CSL       cslewis@mail.com
janedoe                     Jane Doe       janedoe      JDO       janedoe@mail.com

# get by username as ResearcherRefNodes
r <- lims$get_researchers(username = "cslewis", asDataFrame = FALSE)
r
$researcher
Reference Class: "ResearcherRefClass"
  Node uri: http://sservename:portnumber/api/v2/researchers/5
  Node children: first-name last-name email lab credentials initials
  Researcher name: CS Lewis
  Researcher username: cslewis
  Researcher email: cslewis@bigelow.org
  Researcher initials: CSL
Clone this wiki locally