commentQuestions: Apply a Commenting Scheme

Description Usage Arguments Value Author(s) See Also Examples

View source: R/comment.R

Description

This function applies a commenting scheme to a set of comparisons to produce a set of comments.

Usage

1

Arguments

result

A set of comparison results, as generated by the compareFiles() function.

...

One or more commenting schemes, as generated by the questionComments() function.

Value

A matrix of comments.

Author(s)

Paul Murrell

See Also

questionComments and compareFiles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
modelNames <- c("id", "age", 
                "edu", "class", 
                "IndianMothers")
files <- list.files(system.file("example", package="compare"),
                    pattern="^student[0-9]+[.]R$",
                    full.names=TRUE)

results <- compareFiles(files,
                        modelNames,
                        system.file("example", "model.R", package="compare"),
                        allowAll=TRUE,
                        resultNames=gsub(".+[/]|[.]R", "", files))
q1comments <- questionComments(c("id", "age", "edu", "class"),
                               comments("class",
                                        transformComment("coerced",
                                                         "'class' is a factor!")))
commentQuestions(results, q1comments)

compare documentation built on May 2, 2019, 10:24 a.m.