Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Luigi Marongiu
Awesome, thanks! On Wed, Nov 10, 2021 at 10:33 PM Rasmus Liland wrote: > > Dear Luigi, > > Yes, from the named list of dataframes, > you access the demographic table like > that. > > You can remove dput() now, I used it > only to print the output; read ?dput, > it's very handy the next time you a

Re: [R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Avi Gross via R-help
Rich, I think many here may not quite have enough info to help you. But the subject of multiple plots has come up. There are a slew of ways, especially in the ggplot paradigm, to make multiple smaller plots into a larger display showing them in some number of rows and columns, or other ways. Some

Re: [R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Rich Shepard
On Wed, 10 Nov 2021, Bert Gunter wrote: As always, online search (on "ggplot2 help") seemed to bring up useful resources. I suggest you look here (suggested tutorials and resources are farther down the page): https://ggplot2.tidyverse.org/ Bert, My web search was for multiple boxplots and I d

Re: [R] [External] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Rich Shepard
On Wed, 10 Nov 2021, Richard M. Heiberger wrote: I don't understand your question. It looks like the example in ?lattice::panel.bwplot does exactly what you want (modulo using ggplot instead of lattice). Therefore it looks like creating a single column of y from the y in each data.frame, and als

Re: [R] [External] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Richard M. Heiberger
I don't understand your question. It looks like the example in ?lattice::panel.bwplot does exactly what you want (modulo using ggplot instead of lattice). Therefore it looks like creating a single column of y from the y in each data.frame, and also a single column of x from the x in each data.

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Dear Luigi, Yes, from the named list of dataframes, you access the demographic table like that. You can remove dput() now, I used it only to print the output; read ?dput, it's very handy the next time you ask questions on this list. Take a closer look at my obfuscated code ... To only

Re: [R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Bert Gunter
As always, online search (on "ggplot2 help") seemed to bring up useful resources. I suggest you look here (suggested tutorials and resources are farther down the page): https://ggplot2.tidyverse.org/ Bert Gunter On Wed, Nov 10, 2021 at 12:16 PM Rich Shepard wrote: > > On Wed, 10 Nov 2021, Rich

Re: [R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Rich Shepard
On Wed, 10 Nov 2021, Rich Shepard wrote: I have the code to create ggplot2 boxplots using two attributes (e.g., chemical concentration and month) from the same tibble. Is there an example from which I can learn how to make boxplots from different tibbles/dataframes (e.g., chemical concentrations

[R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Rich Shepard
I have the code to create ggplot2 boxplots using two attributes (e.g., chemical concentration and month) from the same tibble. Is there an example from which I can learn how to make boxplots from different tibbles/dataframes (e.g., chemical concentrations and monitoring location)? TIA, Rich ___

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Luigi Marongiu
I tried this: ``` x = dput(sapply(names(ODB::odb.tables(db)), function(tbl) { sqlQuery <- paste0('SELECT * FROM "', demographic, '"') ODB::odb.read(db, sqlQuery) }, simplify=F)) y = x$demographic ``` so now `y` is the dataframe for the table `demographic`: ``` > y ID Study_ID Hosp_ID

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
On 2021-11-10 18:55 +0100, Luigi Marongiu wrote: > no, it worked. that table was indeed > empty and you for the right entries on > the other table. I'll try on my > machine, thank you! Cheers man! signature.asc Description: PGP signature __ R-help@r

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Dear Luigi, I tried quoting ... This: odb = ODB::odb.open("proof.odb", jarFile = NULL) dput(sapply(names(ODB::odb.tables(odb)), function(tbl) { sqlQuery <- paste0('SELECT * FROM "', tbl, '"') ODB::odb.read(odb, sqlQuery) }, simplify=F))

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Luigi Marongiu
Sure! I am attaching a simplified version of it. I did not see the quote text; it might be difficult to call all table's names since there are hundreds of columns.. On Wed, Nov 10, 2021 at 4:15 PM Rasmus Liland wrote: > > Are you willing to send me a part of the > the proof.odb so I can run the q

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
also Note in ?ODB::odb.read says: To query databases built with OpenOffice or LibreOffice, it may be necessary to quote table and/or column names in ‘sqlQuery’, as the default behavior of the HSQL engine is to convert unquoted table and col

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Are you willing to send me a part of the the proof.odb so I can run the query? R signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Luigi Marongiu
Thank you. I have used ODB, it looks easier to use (and install since it needs way fewer dependencies than odbc) but I can't run the SQL statement: ``` > library(ODB) Loading required package: DBI Loading required package: RJDBC Loading required package: rJava > db = odb.open("proof.odb", jarFile

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Dear Luigi, I found the package ODB https://cran.r-project.org/web/packages/ODB/ODB.pdf and was able to install it after reconfiguring rJava ... The help page ?ODB::odb.open has this example: odbFile <- tempfile(fileext=".odb") odb.create(odbFile, overwrite="do")

[R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Luigi Marongiu
how can I connect to a LibreOffice base odb file using the package odbc for R? I tried with: > library(odbc) > library(DBI) > con <- dbConnect(odbc::odbc(), + driver = "PostgreSQL Driver", + database = "proof.odb", + uid = "", + p

Re: [R] GPL or not (was "(no subject)")

2021-11-10 Thread Martin Maechler
> Arnaud FELD > on Tue, 9 Nov 2021 23:03:40 +0100 writes: > Thanks for your answer. That is helpful even if that is disappointing > for me ;) I can see now that, as R (base and recommended packages) has > had contributions from a lot of people, it's not like a package, you