Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
^inst/htmlwidgets/lib/d3/node_modules/
^inst/htmlwidgets/lib/leaflet/node_modules/
^cran-comments\.md$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
86 changes: 86 additions & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
- master

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ inst/doc
inst/htmlwidgets/lib/d3/node_modules/
inst/htmlwidgets/lib/leaflet/node_modules/
cran-comments.md
/doc/
/Meta/
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: processanimateR
Type: Package
Title: Process Map Token Replay Animation
Version: 1.1.0.9000
Authors@R: c(person("Felix","Mannhardt", email = "felix.mannhardt@sintef.no", role = c("aut","cre")),
Authors@R: c(person("Felix","Mannhardt", email = "felix.mannhardt@tue.nl", role = c("aut","cre")),
person("Gert","Janssenswillen",email = "gert.janssenswillen@uhasselt.be", role = c("ctb")))
Description: Provides animated process maps based on the 'procesmapR' package.
Cases stored in event logs created with with 'bupaR' S3 class eventlog() are
Expand Down Expand Up @@ -35,7 +35,7 @@ Suggests:
shiny,
RColorBrewer,
lubridate
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
URL: https://github.com/bupaverse/processanimateR/
BugReports: https://github.com/bupaverse/processanimateR/issues
VignetteBuilder: knitr
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(activity_aes)
export(activity_scale)
export(activity_select_decoration)
export(animate_process)
export(attribution_osm)
Expand Down
40 changes: 40 additions & 0 deletions R/token_aes.R → R/aesthetics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
#' @title Activity aesthetics mapping
#'
#' @param color The scale used for the activity color,
#' @param linecolor The scale used for the activity color,
#' @param opacity The scale used for the activity opacity.
#' @param label The scale used for the additional activity label. Usually an `identity` scale makes sense here.
#' @param attributes A list of additional (fixed - non changing) SVG attributes to be added to each activity.
#'
#' @return An aesthetics mapping for `animate_process`.
#' @export
#'
#' @examples
#' data(example_log)
#' library(eventdataR)
#' animate_process(patients,
#' mode = "absolute",
#' legend = "act_color",
#' duration = 300,
#' mapping_activity =
#' activity_aes(color = activity_scale("employee", scale = "ordinal",
#' range = c("red", "green", "blue", "yellow")),
#' linecolor = activity_scale("time", scale = "time",
#' range = c("white", "black")),
#' opacity = activity_scale("time", scale = "time", range = c(0.3, 1.0)),
#' label = activity_scale("employee", scale = "identity")))
#'
#'
#' @seealso \code{\link{animate_process}}, \code{\link{activity_scale}}
#'
activity_aes <- function(color = activity_scale(),
linecolor = activity_scale(),
opacity = activity_scale(),
label = activity_scale(),
attributes = list()) {

return(c(as.list(environment())))

}


#' @title Tokens aesthetics mapping
#'
#' @param size The scale used for the token size.
Expand Down
Loading