GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • wrapr
  • Reference
  • Articles
  • Corner Cases
  • Debug Vignette
  • Frame Tools
  • Named Arguments
  • Quoting Concatinate
  • Substitution Modes
  • bquote
  • Dot Pipe
  • lambda Function Builder
  • Let
  • Multiple Assignment

This view

  • Original page
  • New address

GeezerVison is showing winvector.github.io — Strict version of unique (without ...). — uniques

Strict version of unique (without ...).

Source: R/uniques.R
uniques.Rd

Check that ... is empty and if so call base::unique(x, incomparables = incomparables, MARGIN = MARGIN, fromLast = fromLast) (else throw an error)

uniques(x, ..., incomparables = FALSE, MARGIN = 1, fromLast = FALSE)

Arguments

x

items to be compared.

...

not used, checked to be empty to prevent errors.

incomparables

passed to base::unique.

MARGIN

passed to base::unique.

fromLast

passed to base::unique.

Value

base::unique(x, incomparables = incomparables, MARGIN = MARGIN, fromLast = fromLast)

Examples

x = c("a", "b") y = c("b", "c") # task: get unique items in x plus y unique(c(x, y)) # correct answer
#> [1] "a" "b" "c"
unique(x, y) # oops forgot to wrap arguments, quietly get wrong answer
#> [1] "a" "b"
tryCatch( uniques(x, y), # uniques catches the error error = function(e) { e })
#> <simpleError: wrapr::uniques unexpected arguments: ‘y’>
uniques(c(x, y)) # uniques works like base::unique in most case
#> [1] "a" "b" "c"
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.