@@ -165,16 +165,13 @@ Create a Data Package with `create_package()` and add your data frame as a resou
165165
166166
167167``` r
168- # Load dplyr or magrittr to support %>% pipes
169- library(dplyr , warn.conflicts = FALSE ) # or library(magrittr)
170-
171168my_package <-
172- create_package() % > %
169+ create_package() | >
173170 add_resource(resource_name = " iris" , data = iris )
174171```
175172
176173::: {.callout-info}
177- You can chain most frictionless functions together using pipes (` %>% ` or ` |> ` ), which improves readability.
174+ You can chain most frictionless functions together using pipes (` |> ` ), which improves readability.
178175:::
179176
180177` my_package ` now contains one resource:
@@ -192,7 +189,7 @@ By default, `add_resource()` will create a **Table Schema** for your data frame,
192189
193190``` r
194191iris_schema <-
195- my_package % > %
192+ my_package | >
196193 schema(" iris" )
197194
198195str(iris_schema )
@@ -310,7 +307,7 @@ Let's add `iris` as a resource to your Data Package again, but this time with th
310307
311308``` r
312309my_package <-
313- my_package % > %
310+ my_package | >
314311 add_resource(
315312 resource_name = " iris" ,
316313 data = iris ,
@@ -331,7 +328,7 @@ path_2 <- system.file("extdata", "v1", "observations_2.tsv", package = "friction
331328
332329# Add both TSV files as a single resource
333330my_package <-
334- my_package % > %
331+ my_package | >
335332 add_resource(
336333 resource_name = " observations" ,
337334 data = c(path_1 , path_2 ),
@@ -369,7 +366,8 @@ The directory will contain four files: the descriptor `datapackage.json`, one CS
369366
370367``` r
371368list.files(" my_directory" )
372- # > [1] "datapackage.json" "iris.csv" "observations_1.tsv" "observations_2.tsv"
369+ # > [1] "datapackage.json" "iris.csv" "observations_1.tsv"
370+ # > [4] "observations_2.tsv"
373371```
374372
375373
0 commit comments