From f09761597aa633460c78f0422a870d86a8edaefd Mon Sep 17 00:00:00 2001 From: Janne Huovari Date: Mon, 19 Mar 2018 16:36:55 +0200 Subject: [PATCH] Break VALUES and CODES with a real separator --- R/read.px.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/read.px.R b/R/read.px.R index 9be8bc1..4bec4a9 100644 --- a/R/read.px.R +++ b/R/read.px.R @@ -46,8 +46,8 @@ read.px <- function(filename, encoding = NULL, } break.clean <- function(x) { - x <- clean.spaces( strsplit(x, split = '\\"')[[1]] ) ## breaks by '"' - x[! x %in% c("," , "")] ## and drops spurious seps + x <- clean.spaces( strsplit(x, split = '\", ?\"')[[1]] ) ## breaks by \", \" (with or without space) + }