USEPA / CompTox-ToxCast-tcpl

US EPA's Toxicity Forecaster (ToxCast) Pipeline. More information on the ToxCast program available here: https://www.epa.gov/comptox-tools/toxicity-forecasting-toxcast
https://cran.r-project.org/package=tcpl
Other
29 stars 12 forks source link

tcplloaddata with joined tables errors on select statement #262

Closed brown-jason closed 2 months ago

brown-jason commented 3 months ago

Noticed this error. When you do a select * on a joined table you get back multiple columns.

tcplConf(user='', pass='', db='invitrodb_test', drvr='MySQL', host='ccte-mysql-res.epa.gov')
l4 <- tcplLoadData(lvl = 4, fld = "aeid", val = 759)

Error in select(): ! Names must be unique. ✖ These names are duplicated:

Ashley-Ko commented 3 months ago

I am getting this same error. I received this error when calling tcplLoadData(). I think it is related to updating the dependency packages when installing tcpl. I tried this on my local machine, without updating the associated packages, and did not get this error.

Ashley-Ko commented 3 months ago

I just tested this again on TH024 and did not get the error. It may be related to one of these packages:

4: openssl (2.1.2 -> 2.2.0) [CRAN] 5: highr (0.10 -> 0.11 ) [CRAN] 6: rmarkdown (2.26 -> 2.27 ) [CRAN] 7: knitr (1.46 -> 1.47 ) [CRAN] 8: RSQLite (2.3.6 -> 2.3.7) [CRAN] 9: RMariaDB (1.3.1 -> 1.3.2) [CRAN]

brown-jason commented 3 months ago

looks like rmariadb update broke our script. We will need to add a fix. In the meantime if you need to use the dev version of tcpl you can do the following:

packageurl <- "https://cran.r-project.org/src/contrib/Archive/RMariaDB/RMariaDB_1.3.1.tar.gz"
install.packages(packageurl, repos=NULL, type="source")