Skip to content

Commit 24a9705

Browse files
authored
Release_3_12 (#32)
better alignment of bullets * update news, version bump * replace class() with is() allows assignment of entities as 'ANY'
1 parent d993928 commit 24a9705

File tree

6 files changed

+615
-585
lines changed

6 files changed

+615
-585
lines changed

DESCRIPTION

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
1-
Package: struct
2-
Type: Package
3-
Title: Statistics in R Using Class-based Templates
4-
Version: 1.1.1
5-
Authors@R: c(
6-
person(
7-
c("Gavin","Rhys"),
8-
"Lloyd",
9-
role=c("aut","cre"),
10-
11-
person(
12-
c("Ralf","Johannes", "Maria"),
13-
"Weber",
14-
role=c("aut"),
15-
16-
)
17-
Description: Defines and includes a set of class-based templates for developing
18-
and implementing data processing and analysis workflows, with a strong
19-
emphasis on statistics and machine learning. The templates can be used and
20-
where needed extended to 'wrap' tools and methods from other packages into a
21-
common standardised structure to allow for effective and fast integration.
22-
Model objects can be combined into sequences, and sequences nested in
23-
iterators using overloaded operators to simplify and improve readability of
24-
the code. STATistics Ontology (STATO) has been integrated and implemented
25-
to provide standardised definitions for methods, inputs and outputs wrapped
26-
using the class-based templates.
27-
License: GPL-3
28-
Encoding: UTF-8
29-
LazyData: true
30-
Collate:
31-
'generics.R'
32-
'struct_class.R'
33-
'parameter_class.R'
34-
'chart_class.R'
35-
'stato_class.R'
36-
'DatasetExperiment_class.R'
37-
'entity_class.R'
38-
'entity_stato_class.R'
39-
'enum_class.R'
40-
'enum_stato_class.R'
41-
'output_class.R'
42-
'model_class.R'
43-
'example_objects.R'
44-
'model_list_class.R'
45-
'metric_class.R'
46-
'iterator_class.R'
47-
'optimiser_class.R'
48-
'preprocess_class.R'
49-
'resampler_class.R'
50-
'struct.R'
51-
'struct_templates.R'
52-
RoxygenNote: 7.1.1
53-
Depends: R (>= 4.0)
54-
Suggests:
55-
testthat,
56-
rstudioapi,
57-
rmarkdown,
58-
covr,
59-
BiocStyle,
60-
openxlsx,
61-
ggplot2,
62-
magick
63-
VignetteBuilder: knitr
64-
Imports: methods, ontologyIndex,
65-
datasets, graphics, stats, utils, knitr,
66-
SummarizedExperiment, S4Vectors
67-
biocViews: WorkflowStep
1+
Package: struct
2+
Type: Package
3+
Title: Statistics in R Using Class-based Templates
4+
Version: 1.1.2
5+
Authors@R: c(
6+
person(
7+
c("Gavin","Rhys"),
8+
"Lloyd",
9+
role=c("aut","cre"),
10+
11+
person(
12+
c("Ralf","Johannes", "Maria"),
13+
"Weber",
14+
role=c("aut"),
15+
16+
)
17+
Description: Defines and includes a set of class-based templates for developing
18+
and implementing data processing and analysis workflows, with a strong
19+
emphasis on statistics and machine learning. The templates can be used and
20+
where needed extended to 'wrap' tools and methods from other packages into a
21+
common standardised structure to allow for effective and fast integration.
22+
Model objects can be combined into sequences, and sequences nested in
23+
iterators using overloaded operators to simplify and improve readability of
24+
the code. STATistics Ontology (STATO) has been integrated and implemented
25+
to provide standardised definitions for methods, inputs and outputs wrapped
26+
using the class-based templates.
27+
License: GPL-3
28+
Encoding: UTF-8
29+
LazyData: true
30+
Collate:
31+
'generics.R'
32+
'struct_class.R'
33+
'parameter_class.R'
34+
'chart_class.R'
35+
'stato_class.R'
36+
'DatasetExperiment_class.R'
37+
'entity_class.R'
38+
'entity_stato_class.R'
39+
'enum_class.R'
40+
'enum_stato_class.R'
41+
'output_class.R'
42+
'model_class.R'
43+
'example_objects.R'
44+
'model_list_class.R'
45+
'metric_class.R'
46+
'iterator_class.R'
47+
'optimiser_class.R'
48+
'preprocess_class.R'
49+
'resampler_class.R'
50+
'struct.R'
51+
'struct_templates.R'
52+
RoxygenNote: 7.1.1
53+
Depends: R (>= 4.0)
54+
Suggests:
55+
testthat,
56+
rstudioapi,
57+
rmarkdown,
58+
covr,
59+
BiocStyle,
60+
openxlsx,
61+
ggplot2,
62+
magick
63+
VignetteBuilder: knitr
64+
Imports: methods, ontologyIndex,
65+
datasets, graphics, stats, utils, knitr,
66+
SummarizedExperiment, S4Vectors
67+
biocViews: WorkflowStep

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Changes in 1.1.2
2+
+ improved 'show' output for objects
3+
+ allow ANY for entities
14
Changes in 1.1.1
25
+ added citations slot to struct classes
36
+ added corresponding citations method

R/entity_class.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ entity = function(name, description=character(0), type='character',
5858
),
5959
validity = function(object) {
6060
check_length = length(value(object)) <= max_length(object)
61-
check_type = class(value(object))[1] %in% object$type
61+
check_type = any(
62+
unlist(
63+
lapply(object$type,function(x){
64+
is(value(object),x)
65+
})
66+
)
67+
)
6268
check_max_length = length(max_length(object)) == 1
6369
msg = TRUE
6470
if (!check_length) {

R/enum_class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ setMethod(f = 'show',
8484
definition = function(object) {
8585
callNextMethod()
8686

87-
cat('allowed: ',paste0(object@allowed,collapse=', '))
87+
cat('allowed: ',paste0(object@allowed,collapse=', '))
8888
cat('\n')
8989
}
9090
)

0 commit comments

Comments
 (0)