Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/juliandaycounter.R
Conversion of character vectors numeric values for Julian day and hour.
1 2 3 4 | juliandaycounter(x, format = "%d-%b-%y",
yr.start = 8, yr.end = 9, na.rm = FALSE)
hourcounter(x, with.min = TRUE,
with.sec = FALSE, na.rm = FALSE)
|
x |
a character vector. |
format |
data format as described on the help page of |
yr.start |
start of year characters. |
yr.end |
start of year characters. |
with.min |
logical, is the input contain minutes? |
with.sec |
logical, is the input contain seconds? |
na.rm |
logical, should NA values removed? |
Date format for juliandaycounter
is "dd-mmm-yy"
with only the last two decimals of year (maximum sring length is 9), by default.
Time format for hourcounter
is "hh:mm"
(or "h:mm"
if hour is <10), by default. 24 hour clock format is used. The formatting of <10 minutes should follow "hh:01"
and not "hh:1"
. Time conversion is done by the times
function in the chron package.
A numeric vector in both cases. juliandaycounter
returns number of Julian day since January 1 of the same year. hourcounter
returns real values for hour of the day (fractions if not 0 minutes).
This is not a general solution for data and time conversions. Pre 2000 year are not handled, because data collection of ABMI started later.
P\'eter S\'olymos, solymos@ualberta.ca
1 2 3 4 5 6 7 8 9 | data(abmi.data)
y <- abmi.data$birdcount$Field.Date
y <- unique(y)
y
juliandaycounter(y)
h <- abmi.data$birdcount$Start.of.Point.Count...24.hour.clock.
h <- h[sample(h, 100)]
h
hourcounter(h)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.