Dear all I am trying to use the ODB package to connect to an libreoffice-odb database. The libreoffice package is german, thus, decimal separator is a comma. However, I can open the database and upload a it without error,
library(ODB) db <- odb.open("Test.odb") but a soon as the "odb.open" command is executed, the decimal separator in R is changed to comma. Before loading the database: > a <- 10.1 > a [1] 10.1 After loading the database > db <- odb.open("Buchhaltung.odb") > a [1] 10,1 but assigning a numeric value to a variable still requires a dot: > a <- 5,1 Error: Unexpected ',' in "a <- 5," Futhermore, printed variables still use the comma as decimal separator: > write.csv(a) "","x" "1",10,1 Since this leads to serious parsing errors when odb sets up sql-queries (eg 5,1 becomes 51), I need to get rid of that behaviour such that numeric values are correctly displayed with a dot as a decimal separator. Does anyone has an idea? Thanks Karl Ps: The following does not work: > a <- as.character(a) > a [1] "10,1" > a <- sub(",",".",a) > a [1] "10.1" > a <- as.numeric(a) > a [1] 10,1 > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.