Skip to content

Commit

Permalink
Update README to remove relocate()
Browse files Browse the repository at this point in the history
  • Loading branch information
UchidaMizuki committed Jul 29, 2024
1 parent 5157914 commit d38413c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ timbr provides some tidyverse methods as follows,

- `mutate()`
- `summarise()`
- `select()` and `relocate()`
- `select()`
- `rows_update()` and `rows_patch()`

## Examples
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ timbr provides some tidyverse methods as follows,

- `mutate()`
- `summarise()`
- `select()` and `relocate()`
- `select()`
- `rows_update()` and `rows_patch()`

## Examples
Expand Down Expand Up @@ -84,6 +84,9 @@ fr
#> 6 b a <key3> b 6
#> 7 b b <key3> a 7
#> 8 b b <key3> b 8
```

``` r
fr_sum
#> # A forest: 14 nodes and 1 feature
#> # Trees:
Expand All @@ -94,6 +97,9 @@ fr_sum
#> <node> <int>
#> 1 <key1> a 10
#> 2 <key1> b 26
```

``` r
children(fr_sum)
#> # A forest: 12 nodes and 1 feature
#> # Groups: key1 [2]
Expand All @@ -106,6 +112,9 @@ children(fr_sum)
#> 2 a <key2> b 7
#> 3 b <key2> a 11
#> 4 b <key2> b 15
```

``` r
fr_sum |>
climb(key3)
#> # A forest: 8 nodes and 1 feature
Expand Down Expand Up @@ -160,6 +169,9 @@ fr
#> 6 a <key2_2> b 7
#> 7 b <key2_2> a 11
#> 8 b <key2_2> b 15
```

``` r
fr_sum
#> # A forest: 26 nodes and 1 feature
#> # Trees:
Expand All @@ -172,6 +184,9 @@ fr_sum
#> <node> <int>
#> 1 <key1> a 20
#> 2 <key1> b 52
```

``` r
traverse(fr_sum,
function(x, children) {
x$value <- prod(children$value)
Expand Down

0 comments on commit d38413c

Please sign in to comment.