Skip to content

Commit

Permalink
Merge pull request #326 from christophsax/no-eol-warn
Browse files Browse the repository at this point in the history
No eol warn
  • Loading branch information
christophsax authored Jun 30, 2024
2 parents 482deab + 348a1d4 commit c08c5a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ minor changes
- Improved messages on rerun in series()
- Spec list in ?series is automatically parsed from the X-13 manual
- Save output files if 'dir' is specified
- Improvements when reading spc files #320 #323 #321


1.9.0
Expand Down
6 changes: 3 additions & 3 deletions R/import.spc.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ import.spc <- function(file, text = NULL){

if (is.null(text)){
stopifnot(file.exists(file))
text <- readLines(file)
text <- readLines(file, warn = FALSE)
} else {
stopifnot(inherits(text, "character"))
text <- paste(text, collapse = "\n")
Expand Down Expand Up @@ -361,7 +361,7 @@ import.ts <- function(file,


if (format %in% c("datevalue", "datevaluecomma", "free", "freecomma")){
txt <- readLines(file)
txt <- readLines(file, warn = FALSE)

dec <- if (format %in% c("datevaluecomma", "freecomma")) "," else "."
sep <- if (grepl("\\t", txt[2])) "\t" else " "
Expand Down Expand Up @@ -497,7 +497,7 @@ import_fortran <- function(file, format, frequency, start = NULL, name = NULL){


import_tramo <- function(file){
txt <- readLines(file)
txt <- readLines(file, warn = FALSE)
ssp <- strsplit(gsub("^ +| +$", "", txt[2]), " ")[[1]]
if (length(ssp) != 4){
stop("tramo format: line 2 must have 4 elements.")
Expand Down

0 comments on commit c08c5a5

Please sign in to comment.