The R Project SVN R

Rev

Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 71228
Line 1... Line 1...
1
% File src/library/methods/man/representation.Rd
1
% File src/library/methods/man/representation.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2013 R Core Team
3
% Copyright 1995-2016 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{representation}
6
\name{representation}
7
\alias{representation}
7
\alias{representation}
8
\alias{prototype}
8
\alias{prototype}
Line 82... Line 82...
82
  stopifnot(!isClass("class3"))
82
  stopifnot(!isClass("class3"))
83
else
83
else
84
  stopifnot(identical(getClassDef("class3"), prev))}
84
  stopifnot(identical(getClassDef("class3"), prev))}
85
}
85
}
86
 
86
 
-
 
87
###  >>> This *is* old syntax -- use 'contains=*, slots=*' instead <<<
-
 
88
###                ==========         ----------  ------   ======
-
 
89
 
-
 
90
%% Just kept here for "back compatibility" ...............
-
 
91
 
87
setClass("Character",representation("character"))
92
setClass("Character",representation("character"))
88
setClass("TypedCharacter",representation("Character",type="character"),
93
setClass("TypedCharacter",representation("Character",type="character"),
89
          prototype(character(0),type="plain"))
94
          prototype(character(0),type="plain"))
90
ttt <- new("TypedCharacter", "foo", type = "character")
95
ttt <- new("TypedCharacter", "foo", type = "character")
91
\dontshow{
96
\dontshow{