ID EN
Miscellaneous

seq.Date

R Base 3.6.2 🇮🇩 Bahasa Indonesia

Metode seq untuk objek kelas "Tanggal" yang mewakili tanggal kalender.

Syntax

R
# S3 method for Date
seq(from, to, by, length.out = NULL, along.with = NULL, …)

Arguments

Parameter Deskripsi
from starting date. Required
to end date. Optional.
by increment of the sequence. Optional. See ‘Details’.
length.out integer, optional. Desired length of the sequence.
along.with take the length from the length of this argument.
… arguments passed to or from other methods.

Return Value

Vektor kelas "Tanggal".

Details

oleh dapat ditentukan dalam beberapa cara. Sejumlah, dianggap dalam beberapa hari. Objek kelas difftime Sebuah string karakter, berisi salah satu dari "hari", "minggu", "bulan", "kuartal" atau "tahun". Opsional ini dapat diawali dengan bilangan bulat (positif atau negatif) dan spasi, atau diikuti dengan "s". Lihat seq.POSIXt untuk detail "bulan".

Contoh

Example
R
# NOT RUN {
## first days of years
seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years")
## by month
seq(as.Date("2000/1/1"), by = "month", length.out = 12)
## quarters
seq(as.Date("2000/1/1"), as.Date("2003/1/1"), by = "quarter")

## find all 7th of the month between two dates, the last being a 7th.
st <- as.Date("1998-12-17")
en <- as.Date("2000-1-7")
ll <- seq(en, st, by = "-1 month")
rev(ll[ll > st & ll < en])
# }

See Also

Date