Skip to content

Commit 3f39ccc

Browse files
committed
detect inch unit differently
1 parent 5e1da64 commit 3f39ccc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/parseOSD_functions.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@
454454
})
455455

456456
# convert in -> cm using the first horizon
457-
if (hz.data$units[1] %in% c('inches', 'in', 'inch')) {
457+
if (!is.na(hz.data$units[1]) &&
458+
startsWith(tolower(hz.data$units[1]), "in")) {
458459
hz.data$top <- round(hz.data$top * 2.54)
459460
hz.data$bottom <- round(hz.data$bottom * 2.54)
460461
}

0 commit comments

Comments
 (0)