Skip to content

Commit

Permalink
fixed#6665
Browse files Browse the repository at this point in the history
  • Loading branch information
venom1204 committed Dec 20, 2024
1 parent 4a2474b commit b61e64c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions man/setkey.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ reference.
\examples{
# Type 'example(setkey)' to run these at the prompt and browse output
# Example: Single character vector of column names
DT = data.table(A = 5:1, B = letters[5:1], C = 10:6)
setindex(DT, A) # Set index using a single column
indices(DT) # View the indices
# Example: List of character vectors
setindexv(DT, list(c("A", "B"), c("B", "C"))) # Setting multiple indices
indices(DT) # View all indices
indices(DT, vectors = TRUE) # View indices as a list of vectors
DT = data.table(A=5:1,B=letters[5:1])
DT # before
setkey(DT,B) # re-orders table and marks it sorted.
Expand Down

0 comments on commit b61e64c

Please sign in to comment.