zodiac | R Documentation |
zodiac
provides the tropical zodiac sign or symbol
for given date(s) x
.
zodiac(
x,
out = "en",
zodiac_swap_mmdd = c(120, 219, 321, 421, 521, 621, 723, 823, 923, 1023, 1123, 1222)
)
x |
Date (as a scalar or vector, required).
If |
out |
Output format (as character).
Available output formats are:
English/Latin ( |
zodiac_swap_mmdd |
Monthly dates on which
the 12 zodiac signs switch (in |
zodiac
is flexible by providing different
output formats (in Latin/English, German, or Unicode/HTML,
see out
) and allowing to adjust the calendar dates
on which a new zodiac is assigned (via zodiac_swap_mmdd
).
Zodiac label or symbol (as a factor).
See https://en.wikipedia.org/wiki/Zodiac or https://de.wikipedia.org/wiki/Tierkreiszeichen for alternative date ranges.
Zodiac()
function of the DescTools package.
Other date and time functions:
change_time()
,
change_tz()
,
cur_date()
,
cur_time()
,
days_in_month()
,
diff_dates()
,
diff_times()
,
diff_tz()
,
is_leap_year()
,
what_date()
,
what_month()
,
what_time()
,
what_wday()
,
what_week()
,
what_year()
zodiac(Sys.Date())
# Works with vectors:
dt <- sample_date(size = 10)
zodiac(dt)
levels(zodiac(dt))
# Alternative outputs:
zodiac(dt, out = "de") # German/deutsch
zodiac(dt, out = "Unicode") # Unicode
zodiac(dt, out = "HTML") # HTML
# Alternative date breaks:
zodiac("2000-08-23") # 0823 is "Virgo" by default
zodiac("2000-08-23", # change to 0824 (i.e., August 24):
zodiac_swap_mmdd = c(0120, 0219, 0321, 0421, 0521, 0621,
0723, 0824, 0923, 1023, 1123, 1222))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.