Description Usage Arguments Details Value Author(s) See Also Examples
Compute x-axis tickmarks like axTicks
in base
but with respect to time. Additionally the first
argument is the object indexed by time which you
are looking to derive tickmark locations for.
It is possible to specify the detail you are seeking,
or by passing 'auto' to the ticks.on
argument,
to get a best heuristic fit.
1 2 3 | axTicksByTime(x, ticks.on='auto', k = 1,
labels=TRUE, format.labels=TRUE, ends=TRUE,
gt = 2, lt = 30)
|
x |
the object indexed by time, or a vector of times/dates |
ticks.on |
what to break on |
k |
frequency of breaks |
labels |
should a labeled vector be returned |
format.labels |
format labels - may be format to use |
ends |
should the ends be adjusted |
gt |
lower bound on number of breaks |
lt |
upper bound on number of breaks |
This function is written for internal use, and documented for those wishing to use outside of the internal function uses. In general it is most unlikely that the end user will call this function directly.
The format.labels allows for standard formatting like
that used in format
, strptime
, and strftime
.
A vector of index points to break on, possibly with the index names.
Jeffrey A. Ryan
1 2 3 4 | data(sample_matrix)
axTicksByTime(as.xts(sample_matrix),'auto')
axTicksByTime(as.xts(sample_matrix),'weeks')
axTicksByTime(as.xts(sample_matrix),'months',7)
|
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Jan 02\n2007 Jan 08\n2007 Jan 15\n2007 Jan 22\n2007 Jan 29\n2007 Feb 05\n2007
1 7 14 21 28 35
Feb 12\n2007 Feb 19\n2007 Feb 26\n2007 Mar 05\n2007 Mar 12\n2007 Mar 19\n2007
42 49 56 63 70 77
Mar 26\n2007 Apr 02\n2007 Apr 09\n2007 Apr 16\n2007 Apr 23\n2007 Apr 30\n2007
84 91 98 105 112 119
May 07\n2007 May 14\n2007 May 21\n2007 May 28\n2007 Jun 04\n2007 Jun 11\n2007
126 133 140 147 154 161
Jun 18\n2007 Jun 25\n2007 Jun 30\n2007
168 175 180
Jan 02\n2007 Jan 08\n2007 Jan 15\n2007 Jan 22\n2007 Jan 29\n2007 Feb 05\n2007
1 7 14 21 28 35
Feb 12\n2007 Feb 19\n2007 Feb 26\n2007 Mar 05\n2007 Mar 12\n2007 Mar 19\n2007
42 49 56 63 70 77
Mar 26\n2007 Apr 02\n2007 Apr 09\n2007 Apr 16\n2007 Apr 23\n2007 Apr 30\n2007
84 91 98 105 112 119
May 07\n2007 May 14\n2007 May 21\n2007 May 28\n2007 Jun 04\n2007 Jun 11\n2007
126 133 140 147 154 161
Jun 18\n2007 Jun 25\n2007 Jun 30\n2007
168 175 180
<NA>
0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.