25
25
# ' @rdname param_obj
26
26
setGeneric ("param_obj ",function(obj,name)standardGeneric("param_obj"))
27
27
28
- # ' @rdname param_obj
28
+ # ' @rdname param_obj
29
29
# ' @export
30
30
setGeneric(" param_obj<-" ,function (obj ,name ,value )standardGeneric(" param_obj<-" ))
31
31
@@ -77,14 +77,14 @@ setGeneric("param_name",function(obj,name)standardGeneric("param_name"))
77
77
# ' @examples
78
78
# ' M = example_model()
79
79
# ' L = param_list(M)
80
- # '
80
+ # '
81
81
# ' M = example_model()
82
82
# ' param_list(M) = list('value_1' = 15,'value_2' = 20)
83
83
# ' @export
84
84
# ' @rdname param_list
85
85
setGeneric ("param_list ",function(obj)standardGeneric("param_list"))
86
86
87
- # ' @rdname param_list
87
+ # ' @rdname param_list
88
88
# ' @export
89
89
setGeneric(" param_list<-" ,function (obj ,value )standardGeneric(" param_list<-" ))
90
90
@@ -98,15 +98,15 @@ setGeneric("param_list<-",function(obj,value)standardGeneric("param_list<-"))
98
98
# ' @examples
99
99
# ' M = example_model()
100
100
# ' param_value(M,'value_1')
101
- # '
101
+ # '
102
102
# ' M = example_model()
103
103
# ' param_value(M,'value_1') = 0.95
104
- # '
104
+ # '
105
105
# ' @export
106
106
# ' @rdname param_value
107
107
setGeneric ("param_value ",function(obj,name)standardGeneric("param_value"))
108
108
109
- # ' @rdname param_value
109
+ # ' @rdname param_value
110
110
# ' @export
111
111
setGeneric(" param_value<-" ,
112
112
function (obj ,name ,value )standardGeneric(" param_value<-" ))
@@ -234,7 +234,7 @@ setGeneric("output_list<-",function(obj,value)standardGeneric("output_list<-"))
234
234
# ' type as an input.
235
235
# '
236
236
# ' @param obj An object derived from the struct_class object
237
- # ' @param ret A string indicating whether a list of objects ('obj') or a list of chart
237
+ # ' @param ret A string indicating whether a list of objects ('obj') or a list of chart
238
238
# ' names ('char') is returned. 'char' is default.
239
239
# ' @return list of chart names, or a list of chart objects
240
240
# ' @examples
@@ -248,8 +248,8 @@ setGeneric("chart_names",function(obj,ret='char')standardGeneric("chart_names"))
248
248
# ' chart_plot
249
249
# '
250
250
# ' Plots a chart object
251
- # '
252
- # ' The optional optional inputs depend on the input object/chart, but might
251
+ # '
252
+ # ' The optional optional inputs depend on the input object/chart, but might
253
253
# ' include an additional dataset object or a second model object, for example.
254
254
# ' @param obj A chart object
255
255
# ' @param dobj An object derived from struct_class
@@ -273,54 +273,58 @@ setGeneric("chart_plot",function(obj, dobj, ...)standardGeneric("chart_plot"))
273
273
# ' Applies a method to the input dataset
274
274
# ' @param M a `method` object
275
275
# ' @param D another object used by the first
276
+ # ' @param ... other optional inputs
276
277
# ' @return Returns a modified method object
277
278
# ' @rdname model_apply
278
279
# ' @examples
279
280
# ' M = example_model()
280
281
# ' M = model_apply(M,iris_DatasetExperiment())
281
282
# ' @export
282
- setGeneric ("model_apply ",function(M,D)standardGeneric("model_apply"))
283
+ setGeneric ("model_apply ",function(M,D,... )standardGeneric("model_apply"))
283
284
284
285
285
286
# ' Train a model
286
287
# '
287
288
# ' Trains a model using the input dataset
288
289
# ' @param M a model object
289
290
# ' @param D a dataset object
291
+ # ' @param ... other optional inputs
290
292
# ' @return Returns a modified model object
291
293
# ' @rdname train
292
294
# ' @examples
293
295
# ' M = example_model()
294
296
# ' M = model_train(M,iris_DatasetExperiment())
295
297
# ' @export
296
- setGeneric ("model_train ",function(M,D)standardGeneric("model_train"))
298
+ setGeneric ("model_train ",function(M,D,... )standardGeneric("model_train"))
297
299
298
300
# ' Model prediction
299
301
# '
300
302
# ' Apply a model using the input dataset. Assumes the model is trained
301
303
# ' first.
302
304
# ' @param M a model object
303
305
# ' @param D a dataset object
306
+ # ' @param ... other optional inputs
304
307
# ' @return Returns a modified model object
305
308
# ' @rdname predict
306
309
# ' @examples
307
310
# ' M = example_model()
308
311
# ' M = model_predict(M,iris_DatasetExperiment())
309
312
# ' @export
310
- setGeneric ("model_predict ",function(M,D)standardGeneric("model_predict"))
313
+ setGeneric ("model_predict ",function(M,D,... )standardGeneric("model_predict"))
311
314
312
315
# ' Reverse preprocessing
313
316
# '
314
317
# ' Reverse the effect of a preprocessing step on a dataset_
315
318
# ' @param M a model object
316
319
# ' @param D a dataset object
320
+ # ' @param ... other optional inputs
317
321
# ' @return Returns a modified dataset object
318
322
# ' @rdname model_reverse
319
323
# ' @examples
320
324
# ' M = example_model()
321
325
# ' D = model_reverse(M,iris_DatasetExperiment())
322
326
# ' @export
323
- setGeneric ("model_reverse ",function(M,D)standardGeneric("model_reverse"))
327
+ setGeneric ("model_reverse ",function(M,D,... )standardGeneric("model_reverse"))
324
328
325
329
# ' Predicted output name
326
330
# '
@@ -347,16 +351,16 @@ setGeneric("predicted_name<-",
347
351
348
352
# ' Sequence input
349
353
# '
350
- # ' get/set the input parameter replaced by the output of the previous model in
354
+ # ' get/set the input parameter replaced by the output of the previous model in
351
355
# ' a model sequence. Default is "data" which passes the output as the data input
352
356
# ' for methods such as \code{model_train} and \code{model_apply}.
353
357
# ' @param M a model object
354
358
# ' @param value name of an output for this model
355
359
# ' @return
356
360
# ' \describe{
357
- # ' \item{\code{seq_in}}{returns the name of the input parameter replaced
361
+ # ' \item{\code{seq_in}}{returns the name of the input parameter replaced
358
362
# ' when used in a model sequence}
359
- # ' \item{\code{seq_in<-}}{sets the name of the input parameter replaced
363
+ # ' \item{\code{seq_in<-}}{sets the name of the input parameter replaced
360
364
# ' when used in a model sequence}
361
365
# ' }
362
366
# ' @rdname seq_in
@@ -584,8 +588,8 @@ setGeneric("stato_definition",function(obj)standardGeneric("stato_definition"))
584
588
setGeneric ("stato_summary ",function(obj)standardGeneric("stato_summary"))
585
589
586
590
# ' Convert a DatasetExperiment to a SummarizedExperiment
587
- # '
588
- # ' Converts a DatasetExperiment to SummarizedExperiment. The assay data is
591
+ # '
592
+ # ' Converts a DatasetExperiment to SummarizedExperiment. The assay data is
589
593
# ' transposed, and colData and rowData switched to match. struct specific
590
594
# ' slots such as "name" and "description" are stored in the metaData.
591
595
# ' @param obj a DatasetExperiment object
@@ -594,8 +598,8 @@ setGeneric("stato_summary",function(obj)standardGeneric("stato_summary"))
594
598
setGeneric ("as.SummarizedExperiment ",function(obj)standardGeneric("as.SummarizedExperiment"))
595
599
596
600
# ' Convert a SummarizedExperiment to DatasetExperiment
597
- # '
598
- # ' Converts a SummarizedExperiment to DatasetExperiment. The assay data is
601
+ # '
602
+ # ' Converts a SummarizedExperiment to DatasetExperiment. The assay data is
599
603
# ' transposed, and colData and rowData switched to match. struct specific
600
604
# ' slots such as "name" and "description" are extracted from the metaData.
601
605
# ' @param obj a SummarizedExperiment object
@@ -604,9 +608,9 @@ setGeneric("as.SummarizedExperiment",function(obj)standardGeneric("as.Summarized
604
608
setGeneric ("as.DatasetExperiment ",function(obj)standardGeneric("as.DatasetExperiment"))
605
609
606
610
# ' Convert to code
607
- # '
611
+ # '
608
612
# ' Prints a block of code that can be used to replicate the input object.
609
- # '
613
+ # '
610
614
# ' @param M a struct model, model_seq or iterator object
611
615
# ' @param start text prepended to the code. Default is "M = "
612
616
# ' @param mode "compact" will use the least amount of lines, "expanded" will
@@ -616,15 +620,15 @@ setGeneric("as.DatasetExperiment",function(obj)standardGeneric("as.DatasetExperi
616
620
# ' @return A string of code to reproduce the input object.
617
621
# ' @export
618
622
# ' @rdname as.code
619
- # ' @examples
623
+ # ' @examples
620
624
# ' M = example_model(value_1 = 10)
621
625
# ' as.code(M)
622
626
setGeneric ('as.code ',function(M,start='M = ',mode='compact',quiet=FALSE)standardGeneric("as.code"))
623
627
624
628
# ' convert to data.frame
625
629
# '
626
630
# ' Most often used with univariate statistics to gather all the different outputs in a consistent format.
627
- # '
631
+ # '
628
632
# ' @param M a struct object
629
633
# ' @param ... other inputs passed through this function
630
634
# ' @return a data.frame containing outputs from an object
@@ -633,14 +637,14 @@ setGeneric("as_data_frame",function(M,...)standardGeneric("as_data_frame"))
633
637
634
638
635
639
# ' Citations for an object
636
- # '
640
+ # '
637
641
# ' All \code{struct} objects have a "citations" slot, which is a list of
638
642
# ' references in bibtex format. The \code{citations} method gathers
639
643
# ' citations from an object and all \code{struct} objects that it inherits to generate
640
644
# ' a complete list.
641
645
# ' @param obj a struct object
642
646
# ' @return a character array of citations
643
- # ' @examples
647
+ # ' @examples
644
648
# ' D = iris_DatasetExperiment()
645
649
# ' D$citations # the list specifically defined for this object
646
650
# ' citations(D) # the list for this object and all inherited ones
@@ -649,30 +653,30 @@ setGeneric("as_data_frame",function(M,...)standardGeneric("as_data_frame"))
649
653
setGeneric ("citations ",function(obj)standardGeneric("citations"))
650
654
651
655
# ' Libraries for an object
652
- # '
656
+ # '
653
657
# ' All \code{struct} objects have a "libraries" slot, which is a character array of
654
658
# ' libraries required to use the object. The \code{libraries} method gathers
655
659
# ' libraries from an object and all \code{struct} objects that it inherits to generate
656
660
# ' a complete list.
657
661
# ' @param obj a struct object
658
662
# ' @return a character array of R packages needed by the object
659
- # ' @examples
663
+ # ' @examples
660
664
# ' M = example_model()
661
665
# ' libraries(M)
662
666
# ' @rdname libraries
663
667
# ' @export
664
668
setGeneric ("libraries ",function(obj)standardGeneric("libraries"))
665
669
666
670
# ' Ontology for an object
667
- # '
671
+ # '
668
672
# ' All \code{struct} objects have an "ontology" slot, which is a list of
669
673
# ' ontology items for the object. The \code{ontology} method gathers
670
674
# ' ontology items from an object and all \code{struct} objects that it inherits to generate
671
675
# ' a complete list.
672
676
# ' @param obj a struct object
673
- # ' @param cache a named list of ontology_terms for offline use. Terms from the cache are search
677
+ # ' @param cache a named list of ontology_terms for offline use. Terms from the cache are search
674
678
# ' based on the name of the list items matching the ontology id. If cache=NULL then the OLS API is used to lookup terms.
675
- # ' @examples
679
+ # ' @examples
676
680
# ' M = example_model()
677
681
# ' ontology(M,cache=NULL)
678
682
# ' @rdname ontology
0 commit comments