Don't do this. Instead, use the category setters.
# S4 method for AbstractCategory
$(x, name)# S4 method for AbstractCategory
$(x, name) <- value
a Category
a field within x
a value for that field to update
$
returns the value of the desired field. Setter
returns x
duly modified.