1
###########################################################################/**
2
# @RdocClass RspStringProduct
3
#
4
# @title "The RspStringProduct class"
5
#
6
# \description{
7
#  @classhierarchy
8
#
9
#  An RspStringProduct is an @see RspProduct that represents an
10
#  RSP product in form of a @character string.
11
# }
12
#
13
# @synopsis
14
#
15
# \arguments{
16
#   \item{...}{@character strings passed to @see "RspProduct".}
17
# }
18
#
19
# \section{Fields and Methods}{
20
#  @allmethods
21
# }
22
#
23
# @author
24
#
25
# @keyword internal
26
#*/###########################################################################
27
setConstructorS3("RspStringProduct", function(...) {
28 1
  extend(RspProduct(...), "RspStringProduct")
29
})
30

31

32
#########################################################################/**
33
# @RdocMethod as.character
34
#
35
# @title "Returns a plain character string representation of an RSP string product"
36
#
37
# \description{
38
#  @get "title".  All attributes including class have been dropped.
39
# }
40
#
41
# @synopsis
42
#
43
# \arguments{
44
#   \item{...}{Not used.}
45
# }
46
#
47
# \value{
48
#  Returns nothing.
49
# }
50
#
51
# @author
52
#
53
# \seealso{
54
#   @seeclass
55
# }
56
#*/#########################################################################
57
setMethodS3("as.character", "RspStringProduct", function(x, ...) {
58 1
  s <- unclass(x)
59 1
  attributes(s) <- NULL
60 1
  s
61
}, protected=TRUE)
62

63

64
setMethodS3("print", "RspStringProduct", function(x, ...) {
65 1
  print(as.character(x), ...)
66
}, protected=TRUE)

Read our documentation on viewing source code .

Loading