current status

This commit is contained in:
2014-12-05 13:21:53 +01:00
parent 967678e2b2
commit 212109d6ac
3 changed files with 38717 additions and 5 deletions
+1 -4
View File
@@ -2,13 +2,10 @@ require(stringr)
# Replace characters messing up JSON validation (\,\n,^)
correctJSON <- function(string) {
# string <- str_replace_all(string, pattern = "\n", replacement = " ")
# string <- str_replace_all(string, pattern = "\r", replacement = " ")
# string <- str_replace_all(string, pattern = "\\^", replacement = " ")
string <- gsub("\\\\{2,}", "", string)
string <- str_replace_all(string, pattern = "[^[:print:]]", replacement = " ")
string <- str_replace_all(string, pattern = "&..;", replacement = " ")
string <- str_replace_all(string, pattern = perl('\\\\(?![tn"])'), replacement = " ")
string <- str_replace_all(string, pattern = "\\{5}", replacement = " ")
return(string)
}