profile
viewpoint
Hadley Wickham hadley @rstudio Houston, TX http://hadley.nz Chief Scientist at @rstudio

hadley/adv-r 1768

Advanced R: a book

hadley/bigvis 275

Exploratory data analysis for large datasets (10-100 million observations)

hadley/assertthat 163

User friendly assertions for R

hadley/babynames 102

An R package containing US baby names from the SSA

garrettgman/ggsubplot 76

Embed subplots in ggplot2 graphics in R

cwickham/munsell 70

munsell colour system for R

dcl-2017-04/curriculum 48

Curriculum for Data Challenge Lab (2017-04)

dicook/nullabor 46

Tools for doing statistical inference using data plots

baumer-lab/fertile 32

creating optimal conditions for reproducibility

dcl-2017-01/curriculum 25

Draft syllabus for the Data Challenge Lab

push eventhadley/r-pkgs

Hadley Wickham

commit sha 2e808d6eb6e7554b71d82c8abf0b8ea432430897

Revise bundling recommendations slightly

view details

push time in 6 minutes

push eventhadley/r-pkgs

Hadley Wickham

commit sha c317d679cf4b62eccd072dea3f0f0b3100d6484e

Flesh out some more license details

view details

push time in 7 minutes

issue commentRConsortium/OOP-WG

Uniqueness of class objects

Ah, got it — so method would error when giving anything other than a class object?

I think there's one scenario where we might want to take a string:

method(mean, "pkg::A") <- function(x) 10

This would be shorthand for something like:

if (isNamespaceLoaded("pkg")) {
  method(generic, getExportedValue(pkg, class)) <- value
}

setHook(
  packageEvent(package, "onLoad"),
  function(...) {
    method(generic, getExportedValue(pkg, class)) <- value
  }
)

which would make it easy to register methods for suggested packages.

OTOH it might be more general to create a base helper that runs code when a package is loaded, and then you'd just do:

whenLoaded("pkg", {
  method(mean, pkg::A) <- function() 10
  method(sum, pkg::A) <- function() 5
})

That would make the semantics of method<- simpler.

lawremi

comment created time in 18 minutes

pull request commentr-lib/pkgload

Allow pkgload to reload usethis

I tested this by repeatedly reloading rlang, devtools, pkgload, and usethis.

hadley

comment created time in 40 minutes

issue commentr-lib/pkgload

Why does pkgload:::print.dev_topic() set no_links = TRUE?

Ah because RStudio uses Rdconv and the no_links argument has "logical: suppress hyperlinks to other help topics. Used by R CMD Rdconv."

So I don't think this is possible to fix.

hadley

comment created time in an hour

issue commentr-lib/pkgload

Why does pkgload:::print.dev_topic() set no_links = TRUE?

This code isn't usually called because we use RStudio's previewRd. I took a quick look through the RStudio source code and couldn't find any use of Rd2HTML or no_links.

hadley

comment created time in an hour

PR closed r-lib/pkgload

Reviewers
Eliminate C code

In favour of using rlang function with same implementation

+2 -44

1 comment

6 changed files

hadley

pr closed time in an hour

pull request commentr-lib/pkgload

Eliminate C code

Ooops, this makes it impossible to reload rlang

hadley

comment created time in an hour

push eventr-lib/pkgload

Hadley Wickham

commit sha 523b22dcd202497e7132252cb28567ab2f31601c

Update docs

view details

push time in an hour

PR opened r-lib/pkgload

Reviewers
Allow pkgload to reload usethis

The root cause is that when unloadNamespace() errors, it errors before the package is detached from the search path. I also cleaned up the failure detection and tweaking the messaging

cc @jennybc

+21 -17

0 comment

1 changed file

pr created time in an hour

create barnchr-lib/pkgload

branch : unlock

created branch time in an hour

PR opened r-lib/pkgload

Eliminate C code

In favour of using rlang function with same implementation

+2 -44

0 comment

6 changed files

pr created time in 2 hours

create barnchr-lib/pkgload

branch : no-c

created branch time in 2 hours

issue commentRConsortium/OOP-WG

Uniqueness of class objects

Yeah but in your scenario above there’s no object called A — so I assume that would just be an error?

lawremi

comment created time in 15 hours

issue closedtidyverse/dbplyr

Document methods

So they appear in dplyr docs

closed time in 16 hours

hadley

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 7ffc62530f32612e39b04142065ac86acd46d233

Document main methods Fixes #395

view details

push time in 16 hours

issue commentRConsortium/OOP-WG

Uniqueness of class objects

I think it has to create some sort of UUID; the class argument is purely informative.

It's also worth thinking about whether this would work:

method(mean, "A") <- function(x) 10

And if so, what does it do?

lawremi

comment created time in 16 hours

issue commentRConsortium/OOP-WG

Class unions

Do you have a few examples of where you'd use class unions? I have never used them.

lawremi

comment created time in 16 hours

issue openedtidyverse/dbplyr

Update selection verbs

  • select() and rename() need to use new tidyeval form
  • need to document that doesn't currently support predict functions
  • implement rename_with() method

created time in 16 hours

issue commenttidyverse/dbplyr

Database semi_join() doesn't match R's NA semantics

Could provide sql_is_distinct(con, x, y) generic and then use that in sql_join_tbls() when na_matches is TRUE. I think we'd want to preserve the existing behaviour (clearly documented) and then allow people to choose the R behaviour if desired.

mkirzon

comment created time in 17 hours

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 8c05d8f99815b26e1dddea2ea0c150e64c92509c

Reduce a little more duplication in sql_select methods

view details

push time in 17 hours

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 3127a2bf1b83c0b2c3e673274e78c98f23759a1e

Move sql_clause() to better file name

view details

Hadley Wickham

commit sha 9cf0309bfa8f47fa53a4ad3976dfef619c47e021

Re-organise sql_clause_ functions

view details

Hadley Wickham

commit sha 6f7e331f23ea75c9b3a3da013b52607d933b4b04

Make con the first argument of sql_clause

view details

Hadley Wickham

commit sha a848022cd11981fb1def0103f62f7600072f01eb

Add top argument to sql_clause_select() And use simpler/more modern approach in Oracle

view details

push time in 17 hours

issue commentr-lib/pkgdown

Reduce run-time dependencies

@jangorecki it was deliberate because we want people's plot to look as good as they possibly can.

MichaelChirico

comment created time in 17 hours

push eventtidyverse/tidyr

Jacob Wujciak-Jens

commit sha 3e91aee977a74f84a15a70e08606dde245878f43

Delete unnest.html as it is a 2 year old version (#1048) #1042 #1047

view details

push time in 18 hours

PR merged tidyverse/tidyr

Delete unnest.html as it is a 2 year old version

#1042 #1047

+0 -301

1 comment

1 changed file

assignUser

pr closed time in 18 hours

pull request commenttidyverse/tidyr

Delete unnest.html as it is a 2 year old version

It never occurred to me to do this directly 😆

assignUser

comment created time in 18 hours

push eventtidyverse/dbplyr

Hadley Wickham

commit sha cdd86e5fc343118dee2de244a643fa5febc5f77d

Move arrange tests to test-arrange

view details

Hadley Wickham

commit sha 528a0ceac3a27c297e88d98742c00dc5ec7c33ea

Remove redundant tests

view details

push time in 20 hours

delete branch tidyverse/dbplyr

delete branch : order-by

delete time in 20 hours

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 269cdda12c3d3a51b9799545f9819764f0c387c1

Omit ORDER BY in subqueries (#501) Fixes #276. Closes #471

view details

push time in 20 hours

PR merged tidyverse/dbplyr

Omit ORDER BY in subqueries

Fixes #276. Closes #471

+139 -93

2 comments

15 changed files

hadley

pr closed time in 20 hours

PR closed tidyverse/dbplyr

arrange() only effective at end of pipe, window_order() overrides
  • arrange() can now only be used at the end of a pipe or followed by head(), otherwise it has no effect and raises a warning.
  • window_order() can be used repeatedly but only affects the verb that follows immediately.
  • All other verbs reset the sort order, with warning.
  • An empty arrange() can be used to undo the effects of the last arrange().
  • This change leads to fewer subqueries and fewer redundant ORDER BY clauses.
  • The documentation for arrange() and window_order() has been expanded.

Each commit is self-contained and passes tests. Happy to split into separate pull requests if it helps.

Closes #276, closes #373.

+441 -114

0 comment

30 changed files

krlmlr

pr closed time in 20 hours

issue closedtidyverse/dbplyr

Rethink optimization of ORDER BY

ORDER BY clauses in subqueries are problematic:

  • MSSQL outrights forbids them (#275)
  • Other DBMS sometimes ignore them (see reprex) and are not obliged to follow either (https://mariadb.com/kb/en/library/why-is-order-by-in-a-from-subquery-ignored/, https://dba.stackexchange.com/a/83500/6934)

As a stop gap, we could remove ORDER BY clauses from inner queries if we don't combine the inner and the outer query. With a warning. This would also solve #275. I wonder if this generates spurious warnings, e.g., for window functions.

Alternatively, we could allow arrange() only at the very last step in the pipe, and transform it to window_order() if additional verbs are added, with a warning. This will be a problem later when we want to support lazy operations for data frames.

For a true solution, we cannot simply delay the computation due to aliasing (https://github.com/tidyverse/dbplyr/issues/94#issuecomment-395599454). A few examples, and a reprex illustrating the problem (using #277), are below. This might well be out of scope.

# Input:
lazy_frame(a = 1:3, b = 4:2) %>%
  mutate(a = -a) %>%
  arrange(a) %>%
  mutate(a = -a)

# Equivalent with `arrange()` delayed:
lazy_frame(a = 1:3, b = 4:2) %>%
  mutate(a = -a) %>%
  mutate(zzz_001 = a) %>%
  mutate(a = -a) %>%
  arrange(zzz_001) %>%
  select(-zzz_001)

# Input:
lazy_frame(a = 1:3, b = 4:2) %>%
  arrange(a) %>%
  group_by(b) %>%
  mutate(c = cumsum(a)) %>%
  ungroup()

# Equivalent with `arrange()` delayed:
lazy_frame(a = 1:3, b = 4:2) %>%
  window_order(a) %>%
  group_by(b) %>%
  mutate(c = cumsum(a)) %>%
  ungroup() %>%
  arrange(a)
library(tidyverse)
devtools::load_all("~/git/R/dbplyr")
#> Loading dbplyr
#> 
#> Attaching package: 'testthat'
#> The following object is masked from 'package:dplyr':
#> 
#>     matches
#> The following object is masked from 'package:purrr':
#> 
#>     is_null
#> Registering testing src: df OK
#> Registering testing src: sqlite OK
#> Registering testing src: mysql OK
#> Registering testing src: MariaDB OK
#> Registering testing src: postgres OK
#> Registering testing src: MSSQL OK


test_frame(a = 1:3, b = 4:2) %>%
  map(
    . %>%
      mutate(a = -a) %>%
      arrange(a) %>%
      mutate(a = -a)
  )
#> Created a temporary table named: ##dbplyr_001
#> $df
#> # A tibble: 3 x 2
#>       a     b
#>   <int> <int>
#> 1     3     2
#> 2     2     3
#> 3     1     4
#> 
#> $sqlite
#> # Source:     lazy query [?? x 2]
#> # Database:   sqlite 3.25.3 [:memory:]
#> # Ordered by: a
#>       a     b
#>   <int> <int>
#> 1     3     2
#> 2     2     3
#> 3     1     4
#> 
#> $mysql
#> # Source:     lazy query [?? x 2]
#> # Database:   mysql 5.5.5-10.1.38-MariaDB-0ubuntu0.18.04.1
#> #   [kirill@localhost:/test]
#> # Ordered by: a
#>       a     b
#>   <dbl> <int>
#> 1     1     4
#> 2     2     3
#> 3     3     2
#> 
#> $MariaDB
#> # Source:     lazy query [?? x 2]
#> # Database:   mysql 5.5.5-10.1.38-MariaDB-0ubuntu0.18.04.1
#> #   [kirill@localhost:/test]
#> # Ordered by: a
#>   a                   b
#>   <S3: integer64> <int>
#> 1 1                   4
#> 2 2                   3
#> 3 3                   2
#> 
#> $postgres
#> # Source:     lazy query [?? x 2]
#> # Database:   postgres 9.6.9 [kirill@/var/run/postgresql:5432/kirill]
#> # Ordered by: a
#>       a     b
#>   <int> <int>
#> 1     3     2
#> 2     2     3
#> 3     1     4
#> 
#> $MSSQL
#> # Source:     lazy query [?? x 2]
#> # Database:   Microsoft SQL Server 12.00.1300[@cynkra-mssql/main]
#> # Ordered by: a
#>       a     b
#>   <int> <int>
#> 1     1     4
#> 2     2     3
#> 3     3     2

<sup>Created on 2019-04-09 by the reprex package (v0.2.1.9000)</sup>

closed time in 20 hours

krlmlr

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 38b98444c642413f2cafcd850c1819e515ad0c57

Update docs

view details

push time in 20 hours

push eventtidyverse/dbplyr

Hadley Wickham

commit sha a7a813a659c82e9f25b51749c022fee6fa573d45

Fix optimisation bug

view details

Hadley Wickham

commit sha 079729e544231e5d79a99a593702f7a4841d87ff

Also need to warn during optimisation

view details

Hadley Wickham

commit sha db98c288e93575f0098e5165b4cc574647410e0b

Port translation to other backends

view details

push time in 21 hours

pull request commenttidyverse/dbplyr

Omit ORDER BY in subqueries

Once complete, need to move arrange tests out of test-select.R

hadley

comment created time in a day

pull request commenttidyverse/dbplyr

Omit ORDER BY in subqueries

To do:

# Needs to warn
lf <- lazy_frame(a = 1)
lf %>% mutate(a = -a) %>% arrange(a) %>% mutate(a = -a)
hadley

comment created time in a day

PR opened tidyverse/dbplyr

Omit ORDER BY in subqueries

Fixes #276. Closes #471

+78 -57

0 comment

6 changed files

pr created time in a day

create barnchtidyverse/dbplyr

branch : order-by

created branch time in a day

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 877491afba0da05aceb5534712c7c9f4f70b01ba

Clarify purpose of bare_identifer_ok argument It's really about whether or not we're in a subquery

view details

push time in a day

issue closedtidyverse/dbplyr

Retaining too optimistic order information when manipulating after arrange()

It seems that op_sort() is a tad too optimistic in some cases.

Related: #338 #337. I think arrange() should only have an effect if it's the last verb in a pipe (or can be bubbled down safely), or to define the window order for window functions.

library(tidyverse)
library(dbplyr)

tbl <- memdb_frame(a = 1:3, b = 3:1)
tbl
#> # Source:   table<dbplyr_001> [?? x 2]
#> # Database: sqlite 3.29.0 [:memory:]
#>       a     b
#>   <int> <int>
#> 1     1     3
#> 2     2     2
#> 3     3     1

tbl_a <- tbl %>% arrange(a)
tbl_a
#> # Source:     table<dbplyr_001> [?? x 2]
#> # Database:   sqlite 3.29.0 [:memory:]
#> # Ordered by: a
#>       a     b
#>   <int> <int>
#> 1     1     3
#> 2     2     2
#> 3     3     1

# Sort order wrong, the database won't guarantee lexical ordering
tbl_ab <- tbl %>% arrange(a) %>% arrange(b)
tbl_ab %>% sql_render()
#> <SQL> SELECT *
#> FROM (SELECT *
#> FROM `dbplyr_001`
#> ORDER BY `a`)
#> ORDER BY `b`

# a no longer exists, confusing
tbl_aba <- tbl %>% arrange(a) %>% select(-a)
tbl_aba
#> # Source:     lazy query [?? x 1]
#> # Database:   sqlite 3.29.0 [:memory:]
#> # Ordered by: a
#>       b
#>   <int>
#> 1     3
#> 2     2
#> 3     1

# How can I un-arrange?
tbl_aa <- tbl_aba %>% arrange(a) %>% arrange()
tbl_aa
#> # Source:     lazy query [?? x 1]
#> # Database:   sqlite 3.29.0 [:memory:]
#> # Ordered by: a, a
#>       b
#>   <int>
#> 1     3
#> 2     2
#> 3     1

# The ordering leaks to the lag() call
tbl_ac <- tbl_aba %>% collapse() %>% mutate(c = lag(b))
tbl_ac
#> Error: no such column: a
tbl_ac %>% sql_render()
#> <SQL> SELECT `b`, LAG(`b`, 1, NULL) OVER (ORDER BY `a`) AS `c`
#> FROM (SELECT `b`
#> FROM (SELECT *
#> FROM `dbplyr_001`
#> ORDER BY `a`))

<sup>Created on 2019-11-01 by the reprex package (v0.3.0)</sup>

closed time in a day

krlmlr

issue commenttidyverse/dbplyr

Retaining too optimistic order information when manipulating after arrange()

Ok, I'm comfortable that the current behaviour here is "correct". dbplyr is simulating what happens if you arrange a regular data frame — this may have been a mistake but I don't think it's worth revisiting at this point.

I think the main problem is allowing ORDER BY clauses in subqueries, which is the subject of #276.

krlmlr

comment created time in a day

issue closedtidyverse/dbplyr

Forget window_frame() after next verb

for consistency with window_order(): https://github.com/tidyverse/dbplyr/pull/471#discussion_r430614610.

closed time in a day

krlmlr

issue commenttidyverse/dbplyr

Forget window_frame() after next verb

The more I think about this, the less I like it. (And it doesn't affect existing code, just code in a PR).

krlmlr

comment created time in a day

push eventtidyverse/dbplyr

Hadley Wickham

commit sha c4072d784439180fc016283541488cde940836b9

Implement slice methods Fixes #394

view details

push time in a day

issue closedtidyverse/dbplyr

Provide methods for new slice helpers

And provide an informative error for the slice() method.

closed time in a day

hadley

issue openedtidyverse/dplyr

slice_* need ellipsis::check_dots_used()

created time in a day

issue commenttidyverse/dbplyr

Provide methods for new slice helpers

  • slice_head(), slice_tail()
  • slice_min(), slice_max(),
  • slice_sample()

All also work on groups, so I think will be translated into filter() calls.

hadley

comment created time in a day

push eventtidyverse/dbplyr

Hadley Wickham

commit sha e60c1c91d4ec7f56990c4b4bc993d645fdf89e69

Bump version Next release will be 2.0.0

view details

Hadley Wickham

commit sha 2399899126a940acc21ad52c2254ac5c07f0dd88

Start on vignette describing backend conversion process #385

view details

Hadley Wickham

commit sha 4b1b21f2bf24a61e31ef9b28f627d759edfd8b3a

Implement relocate method Fixes #494

view details

push time in a day

issue closedtidyverse/dbplyr

Add relocate support

closed time in a day

hadley

issue closedtidyverse/dplyr

Export implementation of relocate

So that other packages (e.g. dbplyr, dtplyr) can use it.

closed time in a day

hadley

issue commenttidyverse/dplyr

Export implementation of relocate

Hmmmm, maybe that's not necessary since you can just pass a one row data frame to the default method

hadley

comment created time in a day

issue openedtidyverse/dplyr

Export implementation of relocate

So that other packages (e.g. dbplyr, dtplyr) can use it.

created time in a day

issue openedtidyverse/dplyr

Make count generic

So that dbplyr can override with own implementation

created time in a day

issue commenttidyverse/dbplyr

Replace database generics from dplyr

Need some way for developers to opt-in so that they get warnings/errors without affecting released packages. Maybe provide dbplyr_edition() generic?

hadley

comment created time in a day

push eventhadley/r-pkgs

Stefan Widgren

commit sha f10116b5da8dc04489e07c6bbc289c1b7c14257a

Add missing character (#666)

view details

push time in a day

pull request commenthadley/r-pkgs

Add missing character

Thanks!

stewid

comment created time in a day

PR merged hadley/r-pkgs

Add missing character
+1 -1

0 comment

1 changed file

stewid

pr closed time in a day

pull request commenthadley/mastering-shiny

Typo in 8.1.3

Thanks!

raamthapa

comment created time in a day

push eventhadley/mastering-shiny

Ram Thapa

commit sha 5de390f82e63202bd72e7cf048194f0a0b67e230

Typo in 8.1.3 (#269)

view details

push time in a day

PR merged hadley/mastering-shiny

Typo in 8.1.3

In the sentence "This is important for inputText() which may trigger....", shouldn't it be textInput() instead of inputText()?

+1 -1

0 comment

1 changed file

raamthapa

pr closed time in a day

issue closedr-lib/downlit

Release downlit 0.2.0

Prepare for release:

  • [x] Check current CRAN check results
  • [x] devtools::check(remote = TRUE, manual = TRUE)
  • [x] devtools::check_win_devel()
  • [x] revdepcheck::revdep_check(num_workers = 4)
  • [x] Update cran-comments.md
  • [x] Polish NEWS
  • [x] Review pkgdown reference index for, e.g., missing topics

Submit to CRAN:

  • [x] usethis::use_version('minor')
  • [x] devtools::submit_cran()
  • [x] Approve email

Wait for CRAN...

  • [x] Accepted :tada:
  • [x] usethis::use_github_release()
  • [x] usethis::use_dev_version()

closed time in a day

hadley

created tagr-lib/downlit

tagv0.2.0

Syntax Highlighting and Automatic Linking

created time in a day

release r-lib/downlit

v0.2.0

released time in a day

push eventr-lib/downlit

Hadley Wickham

commit sha df73cf308245f66dd20097f9a40a8f0a3263c566

Increment version number

view details

push time in a day

push eventtidyverse/blob

GitHub

commit sha 2075125f086a7cd21e43bbc755e2282c316040d9

Deploy from Travis build 449 [ci skip] Build URL: https://travis-ci.org/tidyverse/blob/builds/730111756 Commit: 96c3ccaa45f0c5570458095eaea0a5b5642e2c11

view details

push time in 2 days

delete branch rstudio/hex-stickers

delete branch : size-reqs

delete time in 2 days

pull request commentrstudio/hex-stickers

Update to 1.74" stickers

Thanks!!

schloerke

comment created time in 2 days

push eventrstudio/hex-stickers

Barret Schloerke

commit sha 4a66b3c2f37423aa2139ecd2123b3066895a8c98

Update to 1.74" stickers (#48) * Update to 1.74" stickers * Add updated date * Update stickermule.md

view details

push time in 2 days

PR merged rstudio/hex-stickers

Update to 1.74" stickers

update the docs to print 1.74" vs 1.73"

Mention the old size too just so people don't get confused

+4 -3

0 comment

2 changed files

schloerke

pr closed time in 2 days

push eventr-lib/downlit

Hadley Wickham

commit sha bd9dc41c428632f07e920413bb763fa3f7f3d219

Polish news

view details

Hadley Wickham

commit sha 2276d27de1179d7f6f95425c5372a81c84d2b399

Fix R CMD check problems on other platforms

view details

Hadley Wickham

commit sha d2c346935c3e85626c58beab8b624c21ee8e6ac8

Update CRAN comments

view details

Hadley Wickham

commit sha a68b5e5fb6a5530c0185c656ebb7085f3af094eb

All pandoc tests need 2.0.0

view details

push time in 2 days

issue openedr-lib/downlit

Release downlit 0.2.0

Prepare for release:

  • [ ] Check current CRAN check results
  • [ ] devtools::check(remote = TRUE, manual = TRUE)
  • [ ] devtools::check_win_devel()
  • [ ] rhub::check_for_cran()
  • [ ] revdepcheck::revdep_check(num_workers = 4)
  • [ ] Update cran-comments.md
  • [ ] Polish NEWS
  • [ ] Review pkgdown reference index for, e.g., missing topics
  • [ ] Draft blog post

Submit to CRAN:

  • [ ] usethis::use_version('minor')
  • [ ] devtools::submit_cran()
  • [ ] Approve email

Wait for CRAN...

  • [ ] Accepted :tada:
  • [ ] usethis::use_github_release()
  • [ ] usethis::use_dev_version()
  • [ ] Finish blog post
  • [ ] Tweet
  • [ ] Add link to blog post in pkgdown news menu

created time in 2 days

push eventr-lib/downlit

Matthew Strasiotto

commit sha 6046ed8f6e116700a3a805763f7c50752abeddc6

Use installed pkgdown.yml if present (#30) Fixes #29

view details

push time in 2 days

push eventmatthewstrasiotto/downlit

Hadley Wickham

commit sha c90c116d1d563eb081bb3c17a4a4d99065dfbc6a

Match RStudio syntax highlighting (#58) * Colour parens as operators * Match RStudio constants * Match RStudio's handling of special keywords * Tweak classes layout

view details

Maëlle Salmon

commit sha 63f235eea7963139c778aa4bcfdbddea7da70e43

Allow for bookdown hacking (#53)

view details

Maëlle Salmon

commit sha a62ab06cdc93350af0cde2ad5623eaf12918cc97

Don't autolink R6 methods (#55) Fixes #54

view details

Maëlle Salmon

commit sha b6572c919cbaa08f0fa0bbff33023499eeffbc96

Autolink R6 instantiation (#59)

view details

Kirill Müller

commit sha 8b714e6536586919948414f55b4b8e8e5f7ea068

Set default URL (#44) For pkgdown sites without `url` set.

view details

Hadley Wickham

commit sha b66a558c4a92663d9490412e1c734c2d9a8777cf

Merged origin/master into matthewstrasiotto-master

view details

Hadley Wickham

commit sha 135d4a23fd8518d3f0ecfba8a86b34c6f0841404

Add news bullet

view details

push time in 2 days

delete branch r-lib/downlit

delete branch : b-default-url

delete time in 2 days

push eventr-lib/downlit

Kirill Müller

commit sha 8b714e6536586919948414f55b4b8e8e5f7ea068

Set default URL (#44) For pkgdown sites without `url` set.

view details

push time in 2 days

PR merged r-lib/downlit

Set default URL

if not available through the metadata, e.g. if the package doesn't set its url: in its _pkgdown.yml.

+10 -0

1 comment

2 changed files

krlmlr

pr closed time in 2 days

push eventr-lib/downlit

Kirill Müller

commit sha 35e2fdcf17017440ba7112783592dba45ca85a94

Remove extra newline in <pre> output (#42) And don't strip backslashes in urls.

view details

Maëlle Salmon

commit sha dd4abb958676c23bcddb21c0df39f6e7bd30c083

Add pkgdown URL to DESCRIPTION (#47)

view details

Maëlle Salmon

commit sha 2f3094c5d522e78aa0a8796f75638f4081fe2829

Fix library()/vignette() buglet :-) (#50) Fixes #46

view details

Salim B

commit sha e420a843738781fc6d2f22c62394ad93b0f0df76

Fix typos and add links (#51)

view details

Maëlle Salmon

commit sha 3ac34b40a0d1176adb4a4f1c6cdb3a10c4ef20ee

Link packages of form `{packagename}` (#40) Fixes #27

view details

Hadley Wickham

commit sha 001acfcc71e22e90e2be0ca0291b54fadc5cfc1f

Improvements to class allocation

view details

Hadley Wickham

commit sha a951d9d40b2125822e66db3257ccb24a4ddeec0c

More tweaking

view details

Hadley Wickham

commit sha fed66595346c92320e17b789de1a75e9582d6d43

More class tweaking * Improve overall organisation * Link to sheet with pandoc class names & descriptions * Add missing cases for EQ_SUB, brackets, NE, SLOT

view details

Hadley Wickham

commit sha c90c116d1d563eb081bb3c17a4a4d99065dfbc6a

Match RStudio syntax highlighting (#58) * Colour parens as operators * Match RStudio constants * Match RStudio's handling of special keywords * Tweak classes layout

view details

Maëlle Salmon

commit sha 63f235eea7963139c778aa4bcfdbddea7da70e43

Allow for bookdown hacking (#53)

view details

Maëlle Salmon

commit sha a62ab06cdc93350af0cde2ad5623eaf12918cc97

Don't autolink R6 methods (#55) Fixes #54

view details

Maëlle Salmon

commit sha b6572c919cbaa08f0fa0bbff33023499eeffbc96

Autolink R6 instantiation (#59)

view details

Hadley Wickham

commit sha 3f80a7a5333d79dd3a60bc710bb5d9f338b1dffe

Merged origin/master into b-default-url

view details

Hadley Wickham

commit sha e03c663c4227c8640f42743ef52b38e7d70c287a

Add news bullet

view details

push time in 2 days

push eventr-lib/downlit

Maëlle Salmon

commit sha b6572c919cbaa08f0fa0bbff33023499eeffbc96

Autolink R6 instantiation (#59)

view details

push time in 2 days

PR merged r-lib/downlit

R6 instantiation

I wanted to see how I could get

downlit::highlight("library(crul); HttpClient$new()")
#> [1] "<span class='kr'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='o'>(</span><span class='nv'><a href='https://docs.ropensci.org/crul'>crul</a></span><span class='o'>)</span>; <span class='nv'><a href='https://docs.ropensci.org/crul/reference/HttpClient.html'>HttpClient</a></span><span class='o'>$</span><span class='nf'>new</span><span class='o'>(</span><span class='o'>)</span>"

<sup>Created on 2020-09-21 by the reprex package (v0.3.0.9001)</sup>

But

  • it might be adding too much complexity just for the special case of R6 instantiation;
  • I can't test it without adding a dependency (or some sort of mocking);
  • The usefulness of this is quite limited since downlit doesn't know what packages are really attached (compared to what knitr would know) so I'd probably be better off just namespacing (the reprex below works without any tweak). :sweat_smile:
downlit::highlight("crul::HttpClient$new()")
#> [1] "<span class='nf'>crul</span><span class='nf'>::</span><span class='nv'><a href='https://docs.ropensci.org/crul/reference/HttpClient.html'>HttpClient</a></span><span class='o'>$</span><span class='nf'>new</span><span class='o'>(</span><span class='o'>)</span>"

<sup>Created on 2020-09-21 by the reprex package (v0.3.0.9001)</sup>

+26 -0

4 comments

3 changed files

maelle

pr closed time in 2 days

issue commentbrodieG/unitizer

Failure with dev testthat

I'd consider it if you did a PR, but as I said, it's a complex part of testthat that I don't really want to mess with. I agree that deprecation would be desirable here, but this is just a place where I have to make a judgement call based on the amount of existing code in the wild that uses it.

hadley

comment created time in 2 days

push eventtidyverse/dbplyr

Hadley Wickham

commit sha e082f3c2325b5db880bb68959c9d3e4cc74b2e70

Drop db_drop_table()/sql_drop_table() Since no longer used anywhere. #385

view details

Hadley Wickham

commit sha b4edde5deca7ab603e33f833c46ee15c04bd5f03

Standardise sql method names

view details

Hadley Wickham

commit sha 35bb3aa84f1e443e290c8754206f2bb61b418c03

Preserve ident() in mssql_table_rename()

view details

push time in 2 days

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 1b2b298c88d1745ff7ae9bec94d00e334e3d91ec

Re-document

view details

Hadley Wickham

commit sha 74fd7189dea64d787908d1609ebb0f353036b322

Remove db_insert_into method Part of #385

view details

Hadley Wickham

commit sha c29dc1cf8969d3d7358c828136b836a488addfb2

Don't use sql_escape_ident() and sql_escape_string() methods from dplyr #385

view details

Hadley Wickham

commit sha a7f95db0dbac80dfd25ea35cc5bbd7bea4886064

Remove unused db_create_table() method #385

view details

Hadley Wickham

commit sha 3e2c022a7dc8416222e7503d8b92beae657a8526

Implement sql_query_fields() and sql_query_rows() #38

view details

Hadley Wickham

commit sha 16e5e9ccb305a54b9e53aeaff727e7e015297b79

Update vignette and imports

view details

Hadley Wickham

commit sha 1bdd5555ab9fc6a86960a199b02318a1d2d359be

Drop db_data_types() #385

view details

push time in 2 days

push eventtidyverse/dbplyr

Hadley Wickham

commit sha 777e789f2ca30acab6c6f0f9420452476537e973

Capture all need variables in transmute subqueries Fixes #313.

view details

push time in 2 days

issue closedtidyverse/dbplyr

Bug in transmute translation

There is an error in the SQL generation for transmute

library(dplyr)
library(dbplyr)

df <- data.frame(x = 1, y = 2)

# doesn't work
tbl_lazy(df, con = simulate_postgres()) %>% 
  transmute(x, x2 = x + y, y)
#> <SQL>
#> SELECT `x`, `x` + `y` AS `x2`, `y`
#> FROM (SELECT `x`
#> FROM `df`) `dbplyr_001`

# works
tbl_lazy(df, con = simulate_postgres()) %>% 
  transmute(x, y, x2 = x + y)
#> <SQL>
#> SELECT `x`, `y`, `x` + `y` AS `x2`
#> FROM (SELECT `x`, `y`
#> FROM `df`) `dbplyr_002`

<sup>Created on 2019-06-04 by the reprex package (v0.3.0)</sup>

<sup>Created on 2019-06-04 by the reprex package (v0.3.0)</sup>

closed time in 2 days

mgirlich

issue commenttidyverse/dbplyr

Document methods

  • select, rename
  • mutate
  • summarise
  • distinct
  • filter
  • arrange needs to mention impact on window functions
  • pull()
  • window_frame()/window_order() need more details
hadley

comment created time in 2 days

delete branch rstudio/pool

delete branch : dbplyr-pool

delete time in 2 days

push eventrstudio/pool

Hadley Wickham

commit sha a03d7d13342e8f527fec9f2a659e1cc1f3953195

Store pool, not connection (#107)

view details

push time in 2 days

PR merged rstudio/pool

Reviewers
Store pool, not connection

Fixes https://github.com/tidyverse/dbplyr/issues/457

+29 -89

0 comment

6 changed files

hadley

pr closed time in 2 days

issue closedtidyverse/dbplyr

direct support for pool

It appears that the tbl(con, ...) with a pool connection will derive the underlying server-specific connection instead. While doing this is certainly understandable, it suffers from issues that pool is intended to remedy (e.g., reconnects).

con <- pool::dbPool(...)
copy_to(con, mtcars, name = "r2mtcars", temporary = FALSE)
mt_tbl <- tbl(con, "r2mtcars")
mt_tbl
# # Source:   table<r2mtcars> [?? x 11]
# # Database: Microsoft SQL Server 13.00.1742[bevans@FPTC-DATA01/racers]
#      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
#    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#  1  21       6  160    110  3.9   2.62  16.5     0     1     4     4
#  2  21       6  160    110  3.9   2.88  17.0     0     1     4     4
#  3  22.8     4  108     93  3.85  2.32  18.6     1     1     4     1
#  4  21.4     6  258    110  3.08  3.22  19.4     1     0     3     1
#  5  18.7     8  360    175  3.15  3.44  17.0     0     0     3     2
#  6  18.1     6  225    105  2.76  3.46  20.2     1     0     3     1
#  7  14.3     8  360    245  3.21  3.57  15.8     0     0     3     4
#  8  24.4     4  147.    62  3.69  3.19  20       1     0     4     2
#  9  22.8     4  141.    95  3.92  3.15  22.9     1     0     4     2
# 10  19.2     6  168.   123  3.92  3.44  18.3     1     0     4     4
# # ... with more rows

pause, allow the connection to time out

mt_tbl
# Error in new_result(connection@ptr, statement, immediate) : 
#   external pointer is not valid
DBI::dbGetQuery(con, "select top 1 * from r2mtcars")
#   mpg cyl disp  hp drat   wt  qsec vs am gear carb
# 1  21   6  160 110  3.9 2.62 16.46  0  1    4    4

closed time in 2 days

r2evans

push eventrstudio/pool

Hadley Wickham

commit sha 760c7b5d7d0da21c9e0a27b429dab7b12fe074b1

Align test and R file names

view details

push time in 2 days

push eventrstudio/pool

Hadley Wickham

commit sha fb4c20c3171f991e7e0bf2b63d4097eff0493407

Doc fixes * Use actual dplyr API in example * Remove old param

view details

push time in 2 days

push eventrstudio/pool

Hadley Wickham

commit sha fdf8c22b7f3e1be48ceea85f86f1c97d7770432f

Redocument

view details

push time in 2 days

PR opened rstudio/pool

Reviewers
Store pool, not connection

Fixes https://github.com/tidyverse/dbplyr/issues/457

+13 -21

0 comment

3 changed files

pr created time in 2 days

create barnchrstudio/pool

branch : dbplyr-pool

created branch time in 2 days

delete branch rstudio/pool

delete branch : modernise

delete time in 2 days

push eventrstudio/pool

Hadley Wickham

commit sha e5150d6b681c61047402122b72be474f6c0bfd3e

Tidy up docs and description (#104) * Use latest roxygen2 * Generate all docs with roxygen2 * Update package doc to modern style * Use markdown in roxygen * Improve documentation of S4 methods * use_tidy_description()

view details

push time in 2 days

PR merged rstudio/pool

Reviewers
Tidy up docs and description
+359 -257

0 comment

31 changed files

hadley

pr closed time in 2 days

push eventrstudio/pool

Hadley Wickham

commit sha e98f09cd00693c2bf6948bba7c6fd134190df743

use_tidy_github_actions() (#105)

view details

Hadley Wickham

commit sha d2d07c3fdc40bfe94b9506fb5540ef548d97b994

Merge commit 'e98f09cd00693c2bf6948bba7c6fd134190df743' Conflicts: DESCRIPTION

view details

push time in 2 days

push eventrstudio/pool

Hadley Wickham

commit sha e98f09cd00693c2bf6948bba7c6fd134190df743

use_tidy_github_actions() (#105)

view details

push time in 2 days

more