Create photobook index

photobook(photo, index = photobook_index(), groups = NULL,
  n_groups = 3, captions = NULL, dir_out = tempdir())

Arguments

photo

An sf object created by photos_sf

index

A character string produced by photobook_index

groups

Character vector the same length as nrow(photo)

n_groups

The number of groups if date_time_cut is not provided

captions

A character vector of captions

dir_out

Directory where files should be saved, tempdir() by default

Examples

f = geotagged_photo_paths() photo = photos_sf(f) photobook(photo)
#> Saving index as /tmp/RtmpKcGaw2/index.Rmd
#> Copying photos to /tmp/RtmpKcGaw2
#> Saving group 1 as /tmp/RtmpKcGaw2/1.Rmd
#> Saving group 2 as /tmp/RtmpKcGaw2/2.Rmd
#> Saving group 3 as /tmp/RtmpKcGaw2/3.Rmd
# file.edit(file.path(tempdir(), "index.Rmd")) setwd(tempdir()) list.files()
#> [1] "1.Rmd" "2.Rmd" #> [3] "3.Rmd" "images" #> [5] "IMG_20190523_120605_logo.jpg" "IMG_20190523_135034_logo.jpg" #> [7] "IMG_20190524_104545_logo.jpg" "IMG_20190524_110720_logo.jpg" #> [9] "IMG_20190524_200945_logo.jpg" "index.Rmd" #> [11] "photo.html" "photo.Rmd"
bookdown::render_book("index.Rmd")
#> #> #> processing file: _main.Rmd
#> | | | 0% | |... | 4% #> inline R code fragments #> #> | |...... | 9% #> label: unnamed-chunk-1 (with options) #> List of 1 #> $ include: logi FALSE #> #> | |........ | 13% #> ordinary text without R code #> #> | |........... | 17% #> label: unnamed-chunk-2 (with options) #> List of 1 #> $ fig.cap: chr "IMG_20190523_120605_logo.jpg" #> #> | |.............. | 22% #> ordinary text without R code #> #> | |................. | 26% #> label: unnamed-chunk-3 (with options) #> List of 1 #> $ fig.cap: chr "IMG_20190523_135034_logo.jpg" #> #> | |.................... | 30% #> ordinary text without R code #> #> | |....................... | 35% #> label: unnamed-chunk-4 (with options) #> List of 1 #> $ fig.cap: chr "IMG_20190524_104545_logo.jpg" #> #> | |......................... | 39% #> ordinary text without R code #> #> | |............................ | 43% #> label: unnamed-chunk-5 (with options) #> List of 1 #> $ fig.cap: chr "IMG_20190524_110720_logo.jpg" #> #> | |............................... | 48% #> ordinary text without R code #> #> | |.................................. | 52% #> label: unnamed-chunk-6 (with options) #> List of 1 #> $ fig.cap: chr "IMG_20190524_200945_logo.jpg" #> #> | |..................................... | 57% #> ordinary text without R code #> #> | |........................................ | 61% #> label: unnamed-chunk-7 (with options) #> List of 1 #> $ fig.cap: chr "/home/travis/build/Robinlovelace/photomapr/inst/photos/IMG_20190523_120605_logo.jpg" #> #> | |.......................................... | 65% #> ordinary text without R code #> #> | |............................................. | 70% #> label: unnamed-chunk-8 (with options) #> List of 1 #> $ fig.cap: chr "/home/travis/build/Robinlovelace/photomapr/inst/photos/IMG_20190523_135034_logo.jpg" #> #> | |................................................ | 74% #> ordinary text without R code #> #> | |................................................... | 78% #> label: unnamed-chunk-9 (with options) #> List of 1 #> $ fig.cap: chr "/home/travis/build/Robinlovelace/photomapr/inst/photos/IMG_20190524_104545_logo.jpg" #> #> | |...................................................... | 83% #> ordinary text without R code #> #> | |......................................................... | 87% #> label: unnamed-chunk-10 (with options) #> List of 1 #> $ fig.cap: chr "/home/travis/build/Robinlovelace/photomapr/inst/photos/IMG_20190524_110720_logo.jpg" #> #> | |........................................................... | 91% #> ordinary text without R code #> #> | |.............................................................. | 96% #> label: unnamed-chunk-11 (with options) #> List of 1 #> $ fig.cap: chr "/home/travis/build/Robinlovelace/photomapr/inst/photos/IMG_20190524_200945_logo.jpg" #> #> | |.................................................................| 100% #> ordinary text without R code #> #>
#> output file: _main.knit.md
#> /usr/bin/pandoc +RTS -K512m -RTS _main.utf8.md --to html4 --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output _main.html --email-obfuscation none --wrap preserve --standalone --section-divs --table-of-contents --toc-depth 3 --template /home/travis/R/Library/bookdown/templates/gitbook.html --highlight-style pygments --number-sections --include-in-header /tmp/RtmpKcGaw2/rmarkdown-str6dc92ae8eef4.html --mathjax
#> #> Output created: _book/index.html
#> [1] "/tmp/RtmpKcGaw2/_book/index.html"
browseURL("_book/index.html")