MCPcopy Create free account
hub / github.com/biometrics/openbr / toRList

Function toRList

openbr/core/plot.cpp:27–43  ·  view source on GitHub ↗

Flattens file metadata to an R list()

Source from the content-addressed store, hash-verified

25
26// Flattens file metadata to an R list()
27static QString toRList(const File &opts)
28{
29 QStringList retValues;
30 QString format = "%1=%2";
31 foreach (const QString &key, opts.localKeys()) {
32 const QString value = QtUtils::toString(opts.value(key));
33 if (value.startsWith("("))
34 retValues.append(format.arg(key, "\"c" + value + "\""));
35 else if (value == "true")
36 retValues.append(format.arg(key, "TRUE"));
37 else if (value == "false")
38 retValues.append(format.arg(key, "FALSE"));
39 else
40 retValues.append(format.arg(key, "\"" + value + "\""));
41 }
42 return retValues.join(",");
43}
44
45static QStringList getPivots(const QString &file, bool headers)
46{

Callers 3

PlotFunction · 0.85
PlotDetectionFunction · 0.85
PlotKNNFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected