-
Notifications
You must be signed in to change notification settings - Fork 1
/
Column.R
32 lines (30 loc) · 621 Bytes
/
Column.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Column <- setClass("Column",
slots = c(column_index = "numeric")
)
setGeneric(name = "getColumnIndex",
def = function(theObject)
{
standardGeneric("getColumnIndex")
}
)
setMethod(f = "getColumnIndex",
signature = "Column",
definition = function(theObject)
{
return(theObject@column_index)
}
)
setGeneric(name = "setColumnIndex",
def = function(theObject, index_value)
{
standardGeneric("setColumnIndex")
}
)
setMethod(f = "setColumnIndex",
signature = "Column",
definition = function(theObject, index_value)
{
theObject@column_index <- index_value
return(theObject)
}
)