Skip to content

Commit df2e934

Browse files
committed
fix rmd
1 parent 0b58ce7 commit df2e934

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

vignettes/hotpatchR-intro.Rmd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The package includes a real example of this pattern with an exported parent func
5959
```{r example}
6060
library(hotpatchR)
6161
62-
baseline <- dummy_parent_func("test")
62+
baseline <- hotpatchR:::dummy_parent_func("test")
6363
print(baseline)
6464
#> "Parent output -> I am the BROKEN child. Input: test"
6565
@@ -72,12 +72,11 @@ inject_patch(
7272
)
7373
)
7474
75-
patched_result <- dummy_parent_func("test")
75+
patched_result <- hotpatchR:::dummy_parent_func("test")
7676
print(patched_result)
7777
#> "Parent output -> I am the FIXED child! Input: test"
7878
```
7979

80-
This shows the real package behavior: `dummy_parent_func()` is exported, while `dummy_child_func()` is a hidden internal helper that gets replaced inside the `hotpatchR` namespace.
8180

8281
## How inject_patch works
8382

@@ -96,7 +95,7 @@ If you need to restore the original binding, `undo_patch()` reverses the previou
9695

9796
```{r undo-example}
9897
undo_patch(pkg = "hotpatchR", names = "dummy_child_func")
99-
restored_result <- dummy_parent_func("test")
98+
restored_result <- hotpatchR:::dummy_parent_func("test")
10099
print(restored_result)
101100
#> "Parent output -> I am the BROKEN child. Input: test"
102101
```

0 commit comments

Comments
 (0)