flagr: Add a flag

Description Usage Arguments Details See Also Examples

Description

Add a flag icon

Usage

1
2
flagr(flag, squared = FALSE, width = NULL, height = NULL,
  elementId = NULL)

Arguments

flag

ISO 3166-1-alpha-2 code of a country, see examples.

squared

if TRUE will use square flag.

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

elementId

id of <span> (optional).

Details

flag-icon css demo.

See Also

flag-icons css demo, on github

Examples

1
2
3
4
flagr("be") # belgian flag
flagr("gr") # greek flag
flagr("us", width = 100, height = 60) # us flag
flagr("ch", squared = TRUE) # swiss flag squared

JohnCoene/flagr documentation built on May 28, 2019, 12:55 p.m.