Description Usage Arguments Details Value Author(s) Examples
This function is similar to R function length.
| 1 2 | 
| x | a string character, the name of a vector | 
| type | a character which represents the type of analysis to carry out. 
If  | 
| checks | a boolean, if TRUE (default) checks that verify elements on the server side such checks lengthen the run-time so the default is FALSE and one can switch these checks on (set to TRUE) when faced with some error(s). | 
| datasources | a list of opal object(s) obtained after login in to opal servers;
these objects hold also the data assign to R, as  | 
The function returns the pooled length or the length of the a vector or a list for each study.
a numeric, the number of elements of the input vector or list.
Gaye, A.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {
  # load that contains the login details
  data(logindata)
  # login and assign all the variables stored on the server side
  opals <- datashield.login(logins=logindata,assign=TRUE)
  # Example 1: Get the total number of observations across all the studies for the variable 'LAB_TSC' - default behaviour
  ds.length(x='D$LAB_TSC')
  # Example 2: Get the number of observations on each study, for the variable 'LAB_TSC'
  ds.length(x='D$LAB_TSC', type='split')
  # clear the Datashield R sessions and logout
  datashield.logout(opals) 
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.