Closed maelle closed 4 years ago
Here are 2 ways to get the search you want (I upgraded pkgsearch and now I too have pkgsearch::advanced_search()
!):
library(pkgsearch)
x <- advanced_search(
VignetteBuilder = "knitr", VignetteBuilder = "rmarkdown",
size = 75
)
nrow(x)
#> [1] 72
x <- advanced_search(
"VignetteBuilder: knitr AND VignetteBuilder: rmarkdown",
size = 75
)
nrow(x)
#> [1] 72
Created on 2020-06-01 by the reprex package (v0.3.0.9001)
oooooh thank you!
It's different from how advanced_search(Author = "Hester AND NOT Wickham")
works :thinking:
I.e.
pkgsearch::advanced_search(Author = "Hester AND Wickham")
#> - "advanced search" ---------------------------- 16 packages in 0.007 seconds -
#> # package version by @ title
#> 1 100 pkgbuild 1.0.8 Jim Hester 26d Find Tools Needed to Build R Pa...
#> 2 87 memoise 1.1.0 Jim Hester 3y Memoisation of Functions
#> 3 80 sessioninfo 1.1.1 Gábor Csárdi 2y R Session Information
#> 4 69 odbc 1.2.2 Jim Hester 5M Connect to ODBC Compatible Data...
#> 5 68 pkgload 1.1.0 Jim Hester 4d Simulate Package Installation a...
#> 6 67 xml2 1.3.2 Jim Hester 1M Parse XML
#> 7 67 devtools 2.3.0 Jim Hester 2M Tools to Make Developing R Pack...
#> 8 66 withr 2.2.0 Jim Hester 1M Run Code 'With' Temporarily Mod...
#> 9 63 fs 1.4.1 Jim Hester 2M Cross-Platform File System Oper...
#> 10 61 remotes 2.1.1 Jim Hester 4M R Package Installation from Rem...
pkgsearch::advanced_search(Author = "Hester", Author = "Wickham")
#> - "advanced search" ---------------------------- 16 packages in 0.001 seconds -
#> # package version by @ title
#> 1 100 pkgbuild 1.0.8 Jim Hester 26d Find Tools Needed to Build R Pa...
#> 2 87 memoise 1.1.0 Jim Hester 3y Memoisation of Functions
#> 3 80 sessioninfo 1.1.1 Gábor Csárdi 2y R Session Information
#> 4 69 odbc 1.2.2 Jim Hester 5M Connect to ODBC Compatible Data...
#> 5 67 xml2 1.3.2 Jim Hester 1M Parse XML
#> 6 66 withr 2.2.0 Jim Hester 1M Run Code 'With' Temporarily Mod...
#> 7 62 pkgload 1.1.0 Jim Hester 4d Simulate Package Installation a...
#> 8 60 devtools 2.3.0 Jim Hester 2M Tools to Make Developing R Pack...
#> 9 59 remotes 2.1.1 Jim Hester 4M R Package Installation from Rem...
#> 10 59 fs 1.4.1 Jim Hester 2M Cross-Platform File System Oper...
Created on 2020-06-02 by the reprex package (v0.3.0)
So I was expecting the same for VignetteBuilder.
(although I see the scores are different)
I think Author = "Hester AND Wickham"
means (Author: Hester) AND (Wickham)
. I.e. Wickham
may appear in any field.
Aaah ok. I guess this could/should be added in the comments (in the examples).
Which is not great, but you can only do so much w/o parsing the arguments.
I.e. I'd expect to get 66 hits for the search
pkgsearch::advanced_search(VignetteBuilder = "knitr AND rmarkdown")
like when following Julia Silge's blog postCreated on 2020-06-02 by the reprex package (v0.3.0)
Cf https://github.com/r-lib/usethis/issues/1147