unListDS {dsBase}R Documentation

unListDS a serverside aggregate function called by ds.unList


Coerces an R object back from a list towards the class it was before being coerced to a list


unListDS(x.name, recursive, newobj)



the name of the input object to be coerced back from class list. It must be specified in inverted commas. But this argument is usually specified directly by <x.name> argument of the clientside function ds.unList


argument required for native R unlist function - see native R help for unlist function


is the object hard assigned '<<-' to be the output of the function written to the serverside


Unlike most other class coercing functions this is an aggregate function rather than an assign function. This is because the datashield.assign function in opal deals specially with a created object (newobj) if it is of class list. Reconfiguring the function as an aggregate function works around this problem. This aggregate function is based on the native R function unlist and so additional information can be found in the help for unlist. When an object is coerced to a list, depending on the class of the original object some information may be lost. Thus, for example, when a data.frame is coerced to a list information that underpins the structure of the data.frame is lost and when it is subject to the function ds.unlist it is returned to a simpler class than data.frame eg 'numeric' (basically a numeric vector containing all of the original data in all variables in the data.frame but with no structure). If you wish to reconstruct the original data.frame you therefore need to specify this structure again e.g. the column names etc


the object specified by the <newobj> argument (or its default name <x.name>.mat) which is written to the serverside. In addition, two validity messages are returned. The first confirms an output object has been created, the second states its class.


Amadou Gaye, Paul Burton for DataSHIELD Development Team

[Package dsBase version 5.0.0 ]