diff --git a/R/GENESISClasses.R b/R/GENESISClasses.R index 13b60c5..c933180 100644 --- a/R/GENESISClasses.R +++ b/R/GENESISClasses.R @@ -403,8 +403,9 @@ readRegDeath <- function(infile) { bb <- scan(infile, what=character(), blank.lines.skip = FALSE, encoding="ANSI", sep="\n") - h2 <- grep(";Insgesamt;m\\xe4nnlich",bb) - f1 <- grep("__________",bb) + h2 <- grep(";Insgesamt;m\\xe4nnlich",bb, useBytes = TRUE) + # 10 x low line \x5f + f1 <- grep("\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f",bb, useBytes = TRUE) f2 <- length(bb) header <- bb[1:h2] @@ -454,8 +455,9 @@ readRegExp <- function(infile) { bb <- scan(infile, what=character(), blank.lines.skip = FALSE, encoding="ANSI", sep="\n") - h2 <- grep(";Insgesamt;m\\xe4nnlich",bb) - f1 <- grep("__________",bb) + h2 <- grep(";Insgesamt;m\\xe4nnlich",bb, useBytes = TRUE) + # 10 x low line \x5f + f1 <- grep("\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f",bb, useBytes = TRUE) f2 <- length(bb) header <- bb[1:h2]