Browse code

biocheck

Simone authored on 17/05/2021 09:41:45
Showing1 changed files
... ...
@@ -32,23 +32,23 @@
32 32
 #' @rdname condition_eval_func
33 33
 #' @export
34 34
 conds <- function(default = c(""), full = c(""), exact = c("")) {
35
-  df <- .condition("DEF",default)
36
-  fn <- .condition("FULL",full)
37
-  ex <- .condition("EXACT",exact)
38
-  list("condition" = list("def" = df, "full" = fn, "exact" = ex))
35
+    df <- .condition("DEF",default)
36
+    fn <- .condition("FULL",full)
37
+    ex <- .condition("EXACT",exact)
38
+    list("condition" = list("def" = df, "full" = fn, "exact" = ex))
39 39
 }
40 40
 
41 41
 .condition <- function(cond, array) {
42
-  array = array[!array %in% ""]
43
-  array = array[!duplicated(array)]
44
-  
45
-  if(!length(array)) {
46
-    join_condition_matrix <- NULL
47
-  } else {
48
-    join_condition_matrix <- t(vapply(array, function(x) {
49
-      new_value = c(cond, x)
50
-      matrix <- matrix(new_value)
51
-    },character(2)))
52
-  }
53
-  join_condition_matrix
42
+    array = array[!array %in% ""]
43
+    array = array[!duplicated(array)]
44
+    
45
+    if(!length(array)) {
46
+        join_condition_matrix <- NULL
47
+    } else {
48
+        join_condition_matrix <- t(vapply(array, function(x) {
49
+            new_value = c(cond, x)
50
+            matrix <- matrix(new_value)
51
+        },character(2)))
52
+    }
53
+    join_condition_matrix
54 54
 }
Browse code

update with some news

Simone authored on 21/03/2021 14:34:30
Showing1 changed files
... ...
@@ -42,9 +42,9 @@ conds <- function(default = c(""), full = c(""), exact = c("")) {
42 42
   array = array[!array %in% ""]
43 43
   array = array[!duplicated(array)]
44 44
   
45
-  if(!length(array))
45
+  if(!length(array)) {
46 46
     join_condition_matrix <- NULL
47
-  else {
47
+  } else {
48 48
     join_condition_matrix <- t(vapply(array, function(x) {
49 49
       new_value = c(cond, x)
50 50
       matrix <- matrix(new_value)
Browse code

fixed remote

Simone authored on 19/03/2021 17:30:11
Showing1 changed files
1 1
old mode 100644
2 2
new mode 100755
... ...
@@ -32,23 +32,23 @@
32 32
 #' @rdname condition_eval_func
33 33
 #' @export
34 34
 conds <- function(default = c(""), full = c(""), exact = c("")) {
35
-    df <- .condition("DEF",default)
36
-    fn <- .condition("FULL",full)
37
-    ex <- .condition("EXACT",exact)
38
-    list("condition" = list("def" = df, "full" = fn, "exact" = ex))
35
+  df <- .condition("DEF",default)
36
+  fn <- .condition("FULL",full)
37
+  ex <- .condition("EXACT",exact)
38
+  list("condition" = list("def" = df, "full" = fn, "exact" = ex))
39 39
 }
40 40
 
41 41
 .condition <- function(cond, array) {
42
-    array = array[!array %in% ""]
43
-    array = array[!duplicated(array)]
44
-    
45
-    if(!length(array))
46
-        join_condition_matrix <- NULL
47
-    else {
48
-        join_condition_matrix <- t(vapply(array, function(x) {
49
-            new_value = c(cond, x)
50
-            matrix <- matrix(new_value)
51
-        },character(2)))
52
-    }
53
-    join_condition_matrix
42
+  array = array[!array %in% ""]
43
+  array = array[!duplicated(array)]
44
+  
45
+  if(!length(array))
46
+    join_condition_matrix <- NULL
47
+  else {
48
+    join_condition_matrix <- t(vapply(array, function(x) {
49
+      new_value = c(cond, x)
50
+      matrix <- matrix(new_value)
51
+    },character(2)))
52
+  }
53
+  join_condition_matrix
54 54
 }
Browse code

fix take and read

Simone authored on 09/02/2021 09:07:32
Showing1 changed files
... ...
@@ -31,23 +31,20 @@
31 31
 #' @aliases condition_evaluation
32 32
 #' @rdname condition_eval_func
33 33
 #' @export
34
-conds <- function(default = c(""), full = c(""), exact = c(""))
35
-{
34
+conds <- function(default = c(""), full = c(""), exact = c("")) {
36 35
     df <- .condition("DEF",default)
37 36
     fn <- .condition("FULL",full)
38 37
     ex <- .condition("EXACT",exact)
39 38
     list("condition" = list("def" = df, "full" = fn, "exact" = ex))
40 39
 }
41 40
 
42
-.condition <- function(cond, array)
43
-{
41
+.condition <- function(cond, array) {
44 42
     array = array[!array %in% ""]
45 43
     array = array[!duplicated(array)]
46 44
     
47 45
     if(!length(array))
48 46
         join_condition_matrix <- NULL
49
-    else
50
-    {
47
+    else {
51 48
         join_condition_matrix <- t(vapply(array, function(x) {
52 49
             new_value = c(cond, x)
53 50
             matrix <- matrix(new_value)
... ...
@@ -55,5 +52,3 @@ conds <- function(default = c(""), full = c(""), exact = c(""))
55 52
     }
56 53
     join_condition_matrix
57 54
 }
58
-
59
-
Simone authored on 02/01/2018 22:01:09
Showing1 changed files
... ...
@@ -26,9 +26,6 @@
26 26
 #' @return list of 2-D array containing method of evaluation and metadata 
27 27
 #' attribute name
28 28
 #' 
29
-#' @examples
30
-#' 
31
-#' "Where is my example?"
32 29
 #' 
33 30
 #' @name Evaluation-Function
34 31
 #' @aliases condition_evaluation
Browse code

delete jar

Simone authored on 01/01/2018 13:44:59
Showing1 changed files
... ...
@@ -28,7 +28,7 @@
28 28
 #' 
29 29
 #' @examples
30 30
 #' 
31
-#' "where is my example?"
31
+#' "Where is my example?"
32 32
 #' 
33 33
 #' @name Evaluation-Function
34 34
 #' @aliases condition_evaluation
... ...
@@ -51,10 +51,10 @@ conds <- function(default = c(""), full = c(""), exact = c(""))
51 51
         join_condition_matrix <- NULL
52 52
     else
53 53
     {
54
-        join_condition_matrix <- t(sapply(array, function(x) {
54
+        join_condition_matrix <- t(vapply(array, function(x) {
55 55
             new_value = c(cond, x)
56 56
             matrix <- matrix(new_value)
57
-        }))
57
+        },character(2)))
58 58
     }
59 59
     join_condition_matrix
60 60
 }
Simone authored on 28/12/2017 14:43:57
Showing1 changed files
... ...
@@ -34,7 +34,7 @@
34 34
 #' @aliases condition_evaluation
35 35
 #' @rdname condition_eval_func
36 36
 #' @export
37
-condition_evaluation <- function(default = c(""), full = c(""), exact = c(""))
37
+conds <- function(default = c(""), full = c(""), exact = c(""))
38 38
 {
39 39
     df <- .condition("DEF",default)
40 40
     fn <- .condition("FULL",full)
Simone authored on 16/12/2017 15:08:00
Showing1 changed files
... ...
@@ -4,29 +4,27 @@
4 4
 
5 5
 #' Condition evaluation functions
6 6
 #'
7
-#' These functions are used to support joinBy and/or groupBy function parameter.
8
-#' They create a 2-D array made up by two coloumn:
9
-#' type of condition evaluation and the metadata attribute name
7
+#' This function is used to support joinBy and/or groupBy function parameter.
10 8
 #'
11
-#'
12
-#' @param default series of string identifying a name of metadata attribute 
13
-#' to be evaluated.
14
-#' It defines a DEFAULT evaluation of the input values.
9
+#' @param default concatenation of string identifying a name of metadata 
10
+#' attribute to be evaluated. 
11
+#' It defines a DEFAULT evaluation of the input values. 
15 12
 #' DEFAULT evaluation: the two attributes match if both end with value.
16 13
 #' 
17
-#' @param full series of string identifying a name of metadata attribute 
18
-#' to be evaluated.
14
+#' @param full concatenation of string identifying a name of metadata 
15
+#' attribute to be evaluated.
19 16
 #' It defines a FULL (FULLNAME) evaluation of the input values.
20 17
 #' FULL evaluation: two attributes match if they both end with value and,
21 18
 #' if they have further prefixes, the two prefix sequences are identical.
22 19
 #' 
23
-#' @param exact series of string identifying a name of metadata attribute 
24
-#' to be evaluated.
20
+#' @param exact concatenation of string identifying a name of metadata 
21
+#' attribute to be evaluated.
25 22
 #' It defines a EXACT evaluation of the input values.
26 23
 #' EXACT evaluation: only attributes exactly as value match; 
27 24
 #' no further prefixes are allowed. 
28 25
 #' 
29
-#' @return list of 2-D array containing method of evaluation and metadata
26
+#' @return list of 2-D array containing method of evaluation and metadata 
27
+#' attribute name
30 28
 #' 
31 29
 #' @examples
32 30
 #' 
... ...
@@ -41,7 +39,7 @@ condition_evaluation <- function(default = c(""), full = c(""), exact = c(""))
41 39
     df <- .condition("DEF",default)
42 40
     fn <- .condition("FULL",full)
43 41
     ex <- .condition("EXACT",exact)
44
-    list("def" = df, "full" = fn, "exact" = ex)
42
+    list("condition" = list("def" = df, "full" = fn, "exact" = ex))
45 43
 }
46 44
 
47 45
 .condition <- function(cond, array)
Browse code

fix error

Simone authored on 15/12/2017 12:37:00
Showing1 changed files
... ...
@@ -8,86 +8,57 @@
8 8
 #' They create a 2-D array made up by two coloumn:
9 9
 #' type of condition evaluation and the metadata attribute name
10 10
 #'
11
-#' \itemize{
12
-#' \item{FN: It defines a FULL (FULLNAME) evaluation of the input values.
11
+#'
12
+#' @param default series of string identifying a name of metadata attribute 
13
+#' to be evaluated.
14
+#' It defines a DEFAULT evaluation of the input values.
15
+#' DEFAULT evaluation: the two attributes match if both end with value.
16
+#' 
17
+#' @param full series of string identifying a name of metadata attribute 
18
+#' to be evaluated.
19
+#' It defines a FULL (FULLNAME) evaluation of the input values.
13 20
 #' FULL evaluation: two attributes match if they both end with value and,
14
-#' if they have further prefixes, the two prefix sequences are identical}
15
-#' \item{EX: It defines a EXACT evaluation of the input values.
21
+#' if they have further prefixes, the two prefix sequences are identical.
22
+#' 
23
+#' @param exact series of string identifying a name of metadata attribute 
24
+#' to be evaluated.
25
+#' It defines a EXACT evaluation of the input values.
16 26
 #' EXACT evaluation: only attributes exactly as value match; 
17
-#' no further prefixes are allowed. }
18
-#' \item{DF: It defines a DEFAULT evaluation of the input values.
19
-#' DEFAULT evaluation: the two attributes match if both end with value.}
20
-#' }
21
-#'
22
-#' @param ... series of string identifying a name of metadata attribute 
23
-#' to be evaluated
27
+#' no further prefixes are allowed. 
24 28
 #' 
25
-#' @return 2-D array containing method of evaluation and metadata
29
+#' @return list of 2-D array containing method of evaluation and metadata
26 30
 #' 
27 31
 #' @examples
28 32
 #' 
29 33
 #' "where is my example?"
30 34
 #' 
31 35
 #' @name Evaluation-Function
32
-#' @aliases FN
36
+#' @aliases condition_evaluation
33 37
 #' @rdname condition_eval_func
34 38
 #' @export
35
-FN <- function(...)
39
+condition_evaluation <- function(default = c(""), full = c(""), exact = c(""))
36 40
 {
37
-    conds <- c(...)
38
-    conds = conds[!conds %in% ""]
39
-    conds = conds[!duplicated(conds)]
40
-    if(length(conds)<=0)
41
-        join_condition_matrix <- .jnull("java/lang/String")
42
-    else
43
-    {
44
-        join_condition_matrix <- t(sapply(conds, function(x) {
45
-            new_value = c("FULL",x)
46
-            matrix <- matrix(new_value)
47
-        }))
48
-    }
49
-    join_condition_matrix
41
+    df <- .condition("DEF",default)
42
+    fn <- .condition("FULL",full)
43
+    ex <- .condition("EXACT",exact)
44
+    list("def" = df, "full" = fn, "exact" = ex)
50 45
 }
51 46
 
52
-#' @name Evaluation-Function
53
-#' @aliases EX
54
-#' @rdname condition_eval_func
55
-#' @export
56
-EX <- function(...)
47
+.condition <- function(cond, array)
57 48
 {
58
-    conds <- c(...)
59
-    conds = conds[!conds %in% ""]
60
-    conds = conds[!duplicated(conds)]
61
-    if(length(conds)<=0)
62
-        join_condition_matrix <- .jnull("java/lang/String")
49
+    array = array[!array %in% ""]
50
+    array = array[!duplicated(array)]
51
+    
52
+    if(!length(array))
53
+        join_condition_matrix <- NULL
63 54
     else
64 55
     {
65
-        join_condition_matrix <- t(sapply(conds, function(x) {
66
-            new_value = c("EXACT",x)
56
+        join_condition_matrix <- t(sapply(array, function(x) {
57
+            new_value = c(cond, x)
67 58
             matrix <- matrix(new_value)
68 59
         }))
69 60
     }
70 61
     join_condition_matrix
71 62
 }
72 63
 
73
-#' @name Evaluation-Function
74
-#' @aliases DF
75
-#' @rdname condition_eval_func
76
-#' @export
77
-DF <- function(...)
78
-{
79
-    conds <- c(...)
80
-    conds = conds[!conds %in% ""]
81
-    conds = conds[!duplicated(conds)]
82
-    if(length(conds)<=0)
83
-        join_condition_matrix <- .jnull("java/lang/String")
84
-    else
85
-    {
86
-        join_condition_matrix <- t(sapply(conds, function(x) {
87
-            new_value = c("DEF",x)
88
-            matrix <- matrix(new_value)
89
-        }))
90
-    }
91
-    join_condition_matrix
92
-}
93 64
 
Simone authored on 10/12/2017 16:29:05
Showing1 changed files
... ...
@@ -5,7 +5,7 @@
5 5
 #' Condition evaluation functions
6 6
 #'
7 7
 #' These functions are used to support joinBy and/or groupBy function parameter.
8
-#' It create a list of one element: matrix containing the two coloumn:
8
+#' They create a 2-D array made up by two coloumn:
9 9
 #' type of condition evaluation and the metadata attribute name
10 10
 #'
11 11
 #' \itemize{
... ...
@@ -13,16 +13,16 @@
13 13
 #' FULL evaluation: two attributes match if they both end with value and,
14 14
 #' if they have further prefixes, the two prefix sequences are identical}
15 15
 #' \item{EX: It defines a EXACT evaluation of the input values.
16
-#' EXACT evaluation: only attributes exactly as value will match; 
16
+#' EXACT evaluation: only attributes exactly as value match; 
17 17
 #' no further prefixes are allowed. }
18 18
 #' \item{DF: It defines a DEFAULT evaluation of the input values.
19 19
 #' DEFAULT evaluation: the two attributes match if both end with value.}
20 20
 #' }
21 21
 #'
22
-#' @param ... series of string identifying name of metadata attribute 
22
+#' @param ... series of string identifying a name of metadata attribute 
23 23
 #' to be evaluated
24 24
 #' 
25
-#' @return list of 2-D array containing method of evaluation and metadata
25
+#' @return 2-D array containing method of evaluation and metadata
26 26
 #' 
27 27
 #' @examples
28 28
 #' 
Browse code

fix and clean

Simone authored on 06/12/2017 17:47:26
Showing1 changed files
... ...
@@ -4,9 +4,9 @@
4 4
 
5 5
 #' Condition evaluation functions
6 6
 #'
7
-#' These functions is used to support joinBy and/or groupBy function parameter.
7
+#' These functions are used to support joinBy and/or groupBy function parameter.
8 8
 #' It create a list of one element: matrix containing the two coloumn:
9
-#' type of condition evaluation and the metadata attribute
9
+#' type of condition evaluation and the metadata attribute name
10 10
 #'
11 11
 #' \itemize{
12 12
 #' \item{FN: It defines a FULL (FULLNAME) evaluation of the input values.
... ...
@@ -26,11 +26,9 @@
26 26
 #' 
27 27
 #' @examples
28 28
 #' 
29
-#' init_gmql()
30
-#' test_path <- system.file("example", "DATASET", package = "RGMQL")
31
-#' r = read_dataset(test_path)
29
+#' "where is my example?"
32 30
 #' 
33
-#' @name FN
31
+#' @name Evaluation-Function
34 32
 #' @aliases FN
35 33
 #' @rdname condition_eval_func
36 34
 #' @export
... ...
@@ -51,7 +49,7 @@ FN <- function(...)
51 49
     join_condition_matrix
52 50
 }
53 51
 
54
-#' @name EX
52
+#' @name Evaluation-Function
55 53
 #' @aliases EX
56 54
 #' @rdname condition_eval_func
57 55
 #' @export
... ...
@@ -72,7 +70,7 @@ EX <- function(...)
72 70
     join_condition_matrix
73 71
 }
74 72
 
75
-#' @name DF
73
+#' @name Evaluation-Function
76 74
 #' @aliases DF
77 75
 #' @rdname condition_eval_func
78 76
 #' @export
Browse code

minor fix

Simone authored on 27/11/2017 14:29:05
Showing1 changed files
... ...
@@ -4,8 +4,9 @@
4 4
 
5 5
 #' Condition evaluation functions
6 6
 #'
7
-#' These functions is used to create a series of metadata as string
8
-#' that require evaluation on value.
7
+#' These functions is used to support joinBy and/or groupBy function parameter.
8
+#' It create a list of one element: matrix containing the two coloumn:
9
+#' type of condition evaluation and the metadata attribute
9 10
 #'
10 11
 #' \itemize{
11 12
 #' \item{FN: It defines a FULL (FULLNAME) evaluation of the input values.
Browse code

manual and parser

Simone authored on 22/11/2017 23:06:08
Showing1 changed files
... ...
@@ -29,7 +29,8 @@
29 29
 #' test_path <- system.file("example", "DATASET", package = "RGMQL")
30 30
 #' r = read_dataset(test_path)
31 31
 #' 
32
-#' @name evaluation
32
+#' @name FN
33
+#' @aliases FN
33 34
 #' @rdname condition_eval_func
34 35
 #' @export
35 36
 FN <- function(...)
... ...
@@ -49,7 +50,8 @@ FN <- function(...)
49 50
     join_condition_matrix
50 51
 }
51 52
 
52
-#' @name evaluation
53
+#' @name EX
54
+#' @aliases EX
53 55
 #' @rdname condition_eval_func
54 56
 #' @export
55 57
 EX <- function(...)
... ...
@@ -69,7 +71,8 @@ EX <- function(...)
69 71
     join_condition_matrix
70 72
 }
71 73
 
72
-#' @name evaluation
74
+#' @name DF
75
+#' @aliases DF
73 76
 #' @rdname condition_eval_func
74 77
 #' @export
75 78
 DF <- function(...)
Browse code

clean files and folder

Simone authored on 21/11/2017 13:43:55
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,91 @@
1
+#############################
2
+#       EVALUATION         #
3
+############################
4
+
5
+#' Condition evaluation functions
6
+#'
7
+#' These functions is used to create a series of metadata as string
8
+#' that require evaluation on value.
9
+#'
10
+#' \itemize{
11
+#' \item{FN: It defines a FULL (FULLNAME) evaluation of the input values.
12
+#' FULL evaluation: two attributes match if they both end with value and,
13
+#' if they have further prefixes, the two prefix sequences are identical}
14
+#' \item{EX: It defines a EXACT evaluation of the input values.
15
+#' EXACT evaluation: only attributes exactly as value will match; 
16
+#' no further prefixes are allowed. }
17
+#' \item{DF: It defines a DEFAULT evaluation of the input values.
18
+#' DEFAULT evaluation: the two attributes match if both end with value.}
19
+#' }
20
+#'
21
+#' @param ... series of string identifying name of metadata attribute 
22
+#' to be evaluated
23
+#' 
24
+#' @return list of 2-D array containing method of evaluation and metadata
25
+#' 
26
+#' @examples
27
+#' 
28
+#' init_gmql()
29
+#' test_path <- system.file("example", "DATASET", package = "RGMQL")
30
+#' r = read_dataset(test_path)
31
+#' 
32
+#' @name evaluation
33
+#' @rdname condition_eval_func
34
+#' @export
35
+FN <- function(...)
36
+{
37
+    conds <- c(...)
38
+    conds = conds[!conds %in% ""]
39
+    conds = conds[!duplicated(conds)]
40
+    if(length(conds)<=0)
41
+        join_condition_matrix <- .jnull("java/lang/String")
42
+    else
43
+    {
44
+        join_condition_matrix <- t(sapply(conds, function(x) {
45
+            new_value = c("FULL",x)
46
+            matrix <- matrix(new_value)
47
+        }))
48
+    }
49
+    join_condition_matrix
50
+}
51
+
52
+#' @name evaluation
53
+#' @rdname condition_eval_func
54
+#' @export
55
+EX <- function(...)
56
+{
57
+    conds <- c(...)
58
+    conds = conds[!conds %in% ""]
59
+    conds = conds[!duplicated(conds)]
60
+    if(length(conds)<=0)
61
+        join_condition_matrix <- .jnull("java/lang/String")
62
+    else
63
+    {
64
+        join_condition_matrix <- t(sapply(conds, function(x) {
65
+            new_value = c("EXACT",x)
66
+            matrix <- matrix(new_value)
67
+        }))
68
+    }
69
+    join_condition_matrix
70
+}
71
+
72
+#' @name evaluation
73
+#' @rdname condition_eval_func
74
+#' @export
75
+DF <- function(...)
76
+{
77
+    conds <- c(...)
78
+    conds = conds[!conds %in% ""]
79
+    conds = conds[!duplicated(conds)]
80
+    if(length(conds)<=0)
81
+        join_condition_matrix <- .jnull("java/lang/String")
82
+    else
83
+    {
84
+        join_condition_matrix <- t(sapply(conds, function(x) {
85
+            new_value = c("DEF",x)
86
+            matrix <- matrix(new_value)
87
+        }))
88
+    }
89
+    join_condition_matrix
90
+}
91
+