Open sindribaldur opened 4 years ago
if(any(nchar(names(x)) > 31)){ warning("Truncating sheet name(s) to 31 characters") names(x) <- substring(names(x), 1, 29) } nm <- names(x) if(length(unique(nm)) < length(nm)){ warning("Deduplicating sheet names") names(x) <- make.unique(substring(names(x), 1, 28), sep = "_") }
Could be changed to:
nm <- names(x) if(any(nchar(nm) > 31)){ warning("Truncating sheet name(s) to 31 characters") names(x) <- substring(nm, 1, 29) nm <- names(x) } if(anyDuplicated(nm) != 0L){ warning("Deduplicating sheet names") names(x) <- make.unique(substring(nm, 1, 28), sep = "_") }
but I didn't know how to (nor if I should) submit a pull request.
Could be changed to:
but I didn't know how to (nor if I should) submit a pull request.