| 158 | } |
| 159 | |
| 160 | bool finalize(bool show = false) |
| 161 | { |
| 162 | file.write("dev.off()\n"); |
| 163 | if (suffix != "pdf") file.write(qPrintable(QString("unlink(\"%1.%2\")").arg(basename, suffix))); |
| 164 | file.close(); |
| 165 | |
| 166 | bool success = QtUtils::runRScript(file.fileName()); |
| 167 | if (success && show) QtUtils::showFile(basename+"."+suffix); |
| 168 | return success; |
| 169 | } |
| 170 | }; |
| 171 | |
| 172 | // Does not work if dataset folder starts with a number |
no test coverage detected