dwoll / DVHmetrics

Analyze Dose-Volume Histograms and Check Constraints using R
GNU General Public License v2.0
11 stars 5 forks source link

Error in if (!grepl("^(GY|CGY)$", doseUnit)) { : argument is of length zero #4

Closed stephan1312 closed 6 years ago

stephan1312 commented 6 years ago

Hi, I am new to R and even newer to DVH calculations (need them for this project for the first time), so I was very glad to find your package. The data is exported from a Varian Eclipse system, but when I try to read the .txt files using readDVH("H:/filename/with/forward/slashes/patient.txt", type="Eclipse"), I always get an error: Error in if (!grepl("^(GY|CGY)$", doseUnit)) { : argument is of length zero

I already tried to remove all non-standard characters from the text file (according to this issue: https://github.com/dwoll/DVHmetrics/issues/1), but it does not change anything.)

Does anyone have an idea what I need to change?

The DVH file is attached. The system is windows 7, R 3.4.0 on RStudio 1.0.153.

Thank you very much. Stephan

stephan1312 commented 6 years ago

Okay, I found a work around on my own by comparing sample files shipped with the RadOnc library (which throws a similar error when reading mine). The key word "Total dose" in the file needs to be replaced with "Prescribed dose". This bug should be fixed, however, as the file I attached has been exported from an up-to-date clinical Varian Eclipse system. It might be that they slighlty changed their export format.

dwoll commented 6 years ago

Hi Stephan, your diagnosis is correct, ARIA 15 slightly changed the exported file format in the indicated way. The development version of DVHmetrics can import ARIA 15 files without having to edit them first. You can install the development version like this:

install.packages("devtools") devtools::install_github("dwoll/DVHmetrics")

I plan to release the current version to CRAN soon.

Daniel

stephan1312 commented 6 years ago

Hi Daniel, thank you for your swift reply. And above all, thank you for your great package. It really makes my project so much easier! I will try and install the development version, although after the tiny adjustment to the DVH files the release version works like a charm. Thank you Stephan