Skip to content

Commit afad979

Browse files
committed
Driver/R: Implement suggestions by CodeRabbit
1 parent c44a163 commit afad979

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/connect/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ CrateDB drivers and adapters for supported programming languages, frameworks, an
106106
:class-card: sd-pt-3
107107
:class-body: sd-fs-1
108108
:class-title: sd-fs-6
109-
{fab}`r`
109+
{fab}`r-project`
110110
::::
111111

112112
::::{grid-item-card} Ruby

docs/connect/r.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Connect to CrateDB from R applications and notebooks.
1919
# RPostgreSQL: R Interface to the 'PostgreSQL' Database System
2020
# https://cran.r-project.org/web/packages/RPostgreSQL/
2121
if (!require(RPostgreSQL)) {
22-
install.packages("RPostgreSQL", repos="http://cran.us.r-project.org")
22+
install.packages("RPostgreSQL", repos="https://cran.r-project.org")
2323
}
2424
stopifnot(require(RPostgreSQL))
2525

@@ -32,8 +32,9 @@ con <- dbConnect(drv,
3232
host = "localhost",
3333
port = 5432,
3434
user = "crate",
35-
dbname = "testdrive",
35+
dbname = "testdrive"
3636
)
37+
on.exit(DBI::dbDisconnect(con), add = TRUE)
3738

3839
# Invoke a basic select query.
3940
res <- dbGetQuery(con, "SELECT mountain, region, height FROM sys.summits ORDER BY height DESC LIMIT 3;")

0 commit comments

Comments
 (0)