ds.rm {dsBaseClient}R Documentation

ds.rm calling aggregate function rmDS

Description

deletes an R object on the serverside

Usage

ds.rm(x.name = NULL, datasources = NULL)

Arguments

x.name,

the name of the object to be deleted specified in inverted commas. For example: x.name='object.name'.

datasources

specifies the particular opal object(s) to use. If the <datasources> argument is not specified the default set of opals will be used. The default opals are called default.opals and the default can be set using the function ds.setDefaultOpals. If the <datasources> is to be specified, it should be set without inverted commas: e.g. datasources=opals.em or datasources=default.opals. If you wish to apply the function solely to e.g. the second opal server in a set of three, the argument can be specified as: e.g. datasources=opals.em[2]. If you wish to specify the first and third opal servers in a set you specify: e.g. datasources=opals.em[c(1,3)]

Details

this clientside function calls a serverside function based on the rm() function in native R. This is the aggregate function rmDS. The fact that it is an aggregate function maybe surprising because it modifies an object on the serverside, and would therefore be expected to be an assign function. However, as an assign function the last step in running it would be to write the modified object as newobj. But this would fail because the effect of the function is to delete the object and so it would be impossible to write it anywhere. Please note that although this calls an aggregate function there is no <type> argument.

Value

the specified object is deleted from the serverside. If this is successful the message "Object <x.name> successfully deleted" is returned to the clientside (where x.name is the name of the object to be deleted). If the object to be deleted is already absent on a given source, that source will return the message: "Object to be deleted, i.e. <x.name> , does not exist so does not need deleting". Finally, if the specified name of the object to be deleted is too long (>nfilter.stringShort) there is a potential disclosure risk (active code hidden in the name) and the serverside function returns a message such as: "Disclosure risk, number of characters in x.name must not exceed nfilter.stringShort which is currently set at: 25" where '25' is the current setting of the R_Option value of nfilter.stringShort.

Author(s)

Paul Burton for DataSHIELD Development Team


[Package dsBaseClient version 5.0.0 ]