Skip to content

Commit

Permalink
extend vignettes with [ for teal_data
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Oct 29, 2024
1 parent f7894e5 commit e53afc8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions vignettes/teal-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,25 @@ my_data <- within(
{
data1 <- data.frame(id = 1:10, x = 11:20)
data2 <- data.frame(id = 1:10, x = 21:30)
data3 <- data.frame(id = 1:10, x = 31:40)
}
)
# get objects stored in teal_data
my_data[["data1"]]
my_data[["data1"]]
my_data[["data2"]]
# limit objects stored in teal_data
my_data[c("data1", "data3")]
# get reproducible code
get_code(my_data)
# get code just for specific object
get_code(my_data, names = "data2")
# get or set datanames
datanames(my_data) <- c("data1", "data2")
datanames(my_data) <- c("data1", "data2", "data3")
datanames(my_data)
# print
Expand Down Expand Up @@ -93,4 +100,7 @@ join_keys(my_data) <- join_keys(
)
join_keys(my_data)
# join_keys for limited object
join_keys(my_data["child"])
```

0 comments on commit e53afc8

Please sign in to comment.