| changeTemp {svMisc} | R Documentation |
The function changes an item in a list variable located in TempEnv, an environment dedicated to temporary variables (especially useful for GUIs).
changeTemp(x, item, value, replace.existing = TRUE)
x |
The name of the variable containing the list |
item |
The item to change (or create) in the list |
value |
The value to put in the list item |
replace.existing |
Do we replace an existing item? |
Philippe Grosjean <phgrosjean@sciviews.org>
TempEnv, assignTemp, getTemp,
existsTemp, rmTemp, addTemp,
tempvar
changeTemp("tst", "item1", 1:10)
# Retrieve this variable
getTemp("tst")
# Create another item in the list
changeTemp("tst", "item2", TRUE)
getTemp("tst")
# Change it
changeTemp("tst", "item2", FALSE)
getTemp("tst")
# Delete it (= assign NULL to it)
changeTemp("tst", "item2", NULL)
getTemp("tst")
# Delete the whole variable
rmTemp("tst")