Learn R Programming

HelpersMG (version 6.2)

RM_delete: 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
)

Value

The original object with the deleted results managment

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

Author

Marc Girondot marc.girondot@gmail.com

Details

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

See Also

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

Examples

Run this code
if (FALSE) {
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")
}

Run the code above in your browser using DataLab