diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 5d285a57..8627186b 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -41,7 +41,7 @@ jobs: http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: rcmdcheck diff --git a/cran-comments.md b/cran-comments.md index 6468368d..a619162f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -3,6 +3,7 @@ 0 errors | 0 warnings | 1 note * This is a new release. + * I have addressed all requested changes in Gregor Seyer's report (thanks!) * Examples for un-exported functions have been removed. * Examples now only use dontrun{} when the functions @@ -12,4 +13,8 @@ - change user options (wm_opts, wm_opts_defaults) - require a personal token for a web API (auto_delin) * Examples for functions that require access to a web API without a personal token (avg, trans, symmetrise, continuum, loop) now check for site accessibility with a new function (webmorph_up) instead of using dontrun{}. All are also wrapped in \donttest{}. -* The old working directory is now restored in inst/app/app.R using `oldwd <- getwd(); on.exit(oldwd)` in the relevant function. (Sorry; I thought changes to wd in a shiny app didn't affect the user's wd.) \ No newline at end of file +* The old working directory is now restored in inst/app/app.R using `oldwd <- getwd(); on.exit(oldwd)` in the relevant function. (Sorry; I thought changes to wd in a shiny app didn't affect the user's wd.) + +* I found and fixed two small bugs today (while trying to make a pride flag demo, which is an unusual use case), so updated the version to 0.1.1 and hope this gets to you before you look at the previous version. + - Fixed a bug when cropping `blank()` images with no names + - Fixed a bug when using `image_func()` when func = "composite" and the length of stimuli and composite_image are the same. \ No newline at end of file diff --git a/prog_pride.png b/prog_pride.png deleted file mode 100644 index 273340c7..00000000 Binary files a/prog_pride.png and /dev/null differ diff --git a/stuff/pride.R b/stuff/pride.R index bb8dc944..c6a05a1f 100644 --- a/stuff/pride.R +++ b/stuff/pride.R @@ -1,6 +1,8 @@ +# devtools::install_github("debruine/webmorphR") library(webmorphR) wm_opts(fill = "none") +# colors via https://twitter.com/dataandme/status/1531946768270860288?s=20&t=J25ZA4UETcz-awixPP5gDA pride <- c( red = '#E50000', orange = '#FF8D00', @@ -15,9 +17,8 @@ pride <- c( white = '#FFFFFF' ) -stripes <- blank(6, width = 500, height = 50, color = pride[1:6]) - -flag <- plot(stripes, nrow = 6, padding = 0) +stripes <- blank(6, width = 500, height = 50, color = pride[1:6]) |> + plot(nrow = 6, padding = 0) corner <- blank(1, 200, 200, color = pride["white"]) |> pad(50, fill = pride["pink"]) |> @@ -25,12 +26,14 @@ corner <- blank(1, 200, 200, color = pride["white"]) |> pad(50, fill = pride["brown"]) |> pad(50, fill = pride["black"]) |> rotate(degrees = 45, - keep_size = FALSE) |> + keep_size = FALSE) |> crop(width = 0.5, height = 2/3, x_off = 0.5, y_off = 1/6) |> - resize(height = height(flag)) + resize(height = height(stripes)) -prog_pride <- image_func(flag, "composite", corner$img$img) +flag <- image_func(stripes, "composite", corner$img$img) -write_stim(prog_pride, names = "prog_pride.png") +plot(flag) # view image +# write to disk +write_stim(flag, names = "prog_pride.png") \ No newline at end of file