search for: pm10data

Displaying 1 result from an estimated 1 matches for "pm10data".

Did you mean: 1010data
2010 Aug 25
1
Change value of a slot of an S4 object within a method.
...I have an S4 class with a slot "extra" which is a list. I want to be able to add an element called "name" to that list, containing the object "value" (which can be a vector, a dataframe or another S4 object) Obviously setMethod("add.extra",signature=c("PM10Data","character","vector"), function(object,name,value){ object at extra[[name]] <- value } ) Contrary to what I would expect, the line : eval(eval(substitute(expression(object at extra[[name]] <<- value)))) gives the error : Error in object at extra...