From 8a00507044552c13275028df1ebb6a3e56b04b45 Mon Sep 17 00:00:00 2001 From: Hugo Gruson Date: Sun, 1 Nov 2020 09:20:30 +0100 Subject: [PATCH] Make sure wl are sorted by increasing order in parse_generic() fix #30 --- R/parse_generic.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/parse_generic.R b/R/parse_generic.R index 55b7340..525f7bd 100644 --- a/R/parse_generic.R +++ b/R/parse_generic.R @@ -95,5 +95,7 @@ lr_parse_generic <- function(filename, decimal = ".", sep = NULL) { "scope" = NA_real_, "processed" = rawsplit[, dim(rawsplit)[2]]) + data <- data[order(data$wl), ] + return(list(data, metadata)) }