cosTransform <- function(transformId, a=1, b=1){
t = new("transform", .Data = function(x) cos(a*x+b))
t@transformationId = transformId
t
}
cosT <- cosTransform(transformId="CosT",a=2,b=1)
summary(cosT)
Run the code above in your browser using DataLab