# NOT RUN {
## representation for a new class with a directly define slot "smooth"
## which should be a "numeric" object, and extending class "track"
representation("track", smooth ="numeric")
# }
# NOT RUN {
###  >>> This *is* old syntax -- use 'contains=*, slots=*' instead <<<
###                ==========         ----------  ------   ======
# }
# NOT RUN {
<!-- %% Just kept here for "back compatibility" ............... -->
# }
# NOT RUN {
setClass("Character",representation("character"))
setClass("TypedCharacter",representation("Character",type="character"),
          prototype(character(0),type="plain"))
ttt <- new("TypedCharacter", "foo", type = "character")
# }
# NOT RUN {
setClass("num1", representation(comment = "character"),
         contains = "numeric",
         prototype = prototype(pi, comment = "Start with pi"))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab