RM_delete: Delete a results managment or a result within a results...

View source: R/RM_delete.R

RM_deleteR Documentation

Delete a results managment or a result within a results managment from an object

Description

Return the original object with the deleted results managment or result.

Usage

RM_delete(
  x = stop("An object with results managment must be provided"),
  RM = "RM",
  RMname = stop("A name must be provided"),
  valuename = NULL
)

Arguments

x

The object to delete a results managment

RM

The name of results managment stored

RMname

The name of the result that will be deleted or its rank

valuename

The name of the result that will be deleted

Details

RM_delete deletes a results managment or a result within a results managment from an object

Value

The original object with the deleted results managment

Author(s)

Marc Girondot marc.girondot@gmail.com

See Also

Other Results Managment: RM_add(), RM_duplicate(), RM_get(), RM_list()

Examples

## Not run: 
library("HelpersMG")
# Let an object of class objclass being created
obj <- list(A=100, name="My object")
class(obj) <- "objclass"
# And now I create a RM to this object
obj <- RM_add(x=obj, RMname="NewAnalysis1")
obj <- RM_add(x=obj, RMname="NewAnalysis2")
RM_list(obj)
obj <- RM_delete(x=obj, RMname="NewAnalysis1")
RM_list(obj)
obj <- RM_delete(x=obj, RMname=1)
RM_list(obj)
obj <- RM_add(x=obj, RMname="NewAnalysis1", valuename="V1", value=100)
RM_list(obj)
RM_get(x=obj, RMname="NewAnalysis1", valuename="V1")
obj <- RM_add(x=obj, RMname="NewAnalysis1", valuename="V2", value=200)
RM_get(x=obj, RMname="NewAnalysis1", valuename="V2")
obj <- RM_delete(x=obj, RMname="NewAnalysis1", valuename="V1")
RM_get(x=obj, RMname="NewAnalysis1", valuename="V1")
RM_get(x=obj, RMname="NewAnalysis1", valuename="V2")

## End(Not run)

HelpersMG documentation built on Sept. 12, 2024, 9:35 a.m.