library(RMySQL)
con <- dbConnect(MySQL(), dbname="hs***", host="localhost",
port = 3306, user="****",
password="****")
dbSendQuery(con, "SEt NAMES euckr")
d <- dbReadTable(con, "accidents")
str(d)
#it results :
$ lat : num 38 38 38 38 38 38 37 38 38 35 ...
$ longt : num 127 127 127 127 127 ...
structure of latitude and longitude in R says num, but I made these columns decimal(9,7) and (11,8) in MYSQL.
I want to know how to fix it.
Also, I got these error codes:
1: In .local(conn, statement, ...) :
Decimal MySQL column 14 imported as numeric
2: In .local(conn, statement, ...) :
Decimal MySQL column 15 imported as numeric