-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathinspect_logs.Rmd
85 lines (60 loc) · 1.84 KB
/
inspect_logs.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
title: "bupaR Docs | Inspect log"
---
```{r include = F}
library(bupaR)
```
```{r echo = F, out.width="25%", fig.align = "right"}
knitr::include_graphics("images/icons/create.PNG")
```
***
# Inspect logs
## Getting metadata
The mapping function can be used to retrieve all the meta data from a `log` object, i.e. the relation between log identifiers and the corresponding data fields.
```{r}
patients %>% mapping
```
In this case, we see that the handling field is the activity identifier in the event log, while the patient field is used as case identifier. We can also obtain each of these identifiers individually.
```{r results='hold'}
patients %>% activity_id
patients %>% case_id
patients %>% resource_id
```
## Getting basic information {.tabset .tabset-fade .tabset-pills}
We can look at a general summary of the event log with `summary()`.
```{r}
patients %>% summary
```
The basic counts which show up in the summary can also be retrieved individual as a numeric vector of length one.
```{r results='hold'}
patients %>% n_activities
patients %>% n_activity_instances
patients %>% n_cases
patients %>% n_events
patients %>% n_traces
patients %>% n_resources
```
More detailed information about `activities` , `cases`, `resources` and `traces` can be obtained using the functions named accordingly, as in the examples below for the `patients` event log.
### Activities
```{r}
patients %>% activities()
```
### Cases
```{r}
patients %>% cases()
```
### Resources
```{r}
patients %>% resources()
```
### Traces
```{r message = F, warning = F}
patients %>% traces()
```
## {-}
```{r footer, results = "asis", echo = F}
CURRENT_PAGE <- stringr::str_replace(knitr::current_input(), ".Rmd",".html")
res <- knitr::knit_expand("_button_footer.Rmd", quiet = TRUE)
res <- knitr::knit_child(text = unlist(res), quiet = TRUE)
cat(res, sep = '\n')
```