Skip to content
Prev 728 / 1559 Next

rmysql and strings containg \n

let me start by saying RMySQL is a wonderful package of a superb
language:R.? One particular feature I cant seem to get rid of easily
is the hadling of  \n in strings. Is there an easy solution to this?

H. Felix Wittmann

PS : What follows is some code, demonstrating the problem

require(RMySQL)

m <- dbDriver("MySQL")
myCon <- dbConnect(m,dbname = "myDatabase"))? ## replace myDatabase by
what is appropriate for you


test <- data.frame(id=1,myString='beginning1 \n end1')
[1] TRUE
????? id??? myString
1????? 1 beginning1
?end1 NA??????? <NA>
[1] 2 2
[1] 1 2