[Rd] setReplaceMethod creates 'object' in the userworkspace

2017-06-23 Thread Jonathan Fritzemeier
Hi, I recognized that the function 'setReplaceMethod' is creating a character vector in the user workspace having the name (e.g. "newClass") of the class used as value. If you can sort out a mistake by myself, I would like you to file a bug report. BBFN, Jonathan setClass("newClass", representat

Re: [Rd] setReplaceMethod

2006-10-31 Thread John Chambers
There's a two-level issue here, principle and practice. The principle is that the behavior of basic R functions on basic R data types is considered "sealed". Math functions, arithmetic, etc. on basic vectors are not supposed to be alterable. The function "[<-" is one of those functions. If x

[Rd] setReplaceMethod

2006-10-31 Thread Robin Hankin
Hi If x <- 1:10then x[5] <- 1iwill promote x to be a complex vector. Suppose I have an S4 class "brob", and have functions is.brob(), as.brob(), as.numeric() and so forth (minimal self-contained code below). If x is numeric (1:10, say) and y is a brob, what is the best way to make