forked from SophieKoshkareva/RParserForTable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MissingValue.R
39 lines (37 loc) · 1.07 KB
/
MissingValue.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
33
34
35
36
37
38
39
MissingValue <- setClass("MissingValue",
contains = "Error"
)
setMethod(f = "initialize",
signature = "MissingValue",
definition = function(.Object)
{
.Object@title <- c("Ïðîïóùåííûå çíà÷åíèÿ")
.Object@col_index_legend <- 1
.Object@style <- c("missing_value")
return(.Object)
}
)
# setGeneric(name = "FindMissingValue",
# def = function(theObject, table, column_index)
# {
# standardGeneric("FindMissingValue")
# }
# )
#
# setMethod(f = "FindMissingValue",
# signature = "MissingValue",
# definition = function(theObject, table, column_index)
# {
# mis_row_index <- 0
# mis_row_index <- which(is.na(table[[column_index]]))
# print(mis_row_index)
# if (is.null(mis_row_index) == TRUE) {
# print("No missing values")
# # xlsx.createBook(x, sheet_out_name, file_out)
# } else {
# mis_row_index <- mis_row_index + theObject@row_header + theObject@row_symbol
# theObject@indices <- append(theObject@indices, values = paste(mis_row_index, column_index, sep = "."))
# }
# return(theObject)
# }
# )