All these suggestions of using 'sprintf' might be right but you might
be doing it wrong...
If you are working with times, then use the date/time classes and the
handy functions for working on them. Which means the lubridate
package, most likely.
Are these times part of a calendar time, or are the
On Nov 6, 2013, at 10:25 AM, Alaios wrote:
> Hi all,
> the following returns the hour and the minutes
>
> paste(DataSet$TimeStamps[selectedInterval$start,4],
> DataSet$TimeStamps[selectedInterval$start,5],sep=":")
> [1] "12:3"
>
> the problem is that from these two I want to create a time stam
(Assuming I understand) tons of ways of doing this.
So I'll just point out the
?nchar
function, which you can use to count characters in your tail end and
paste a "0" if there's only one, e.g. via ifelse() .
-- Bert
On Wed, Nov 6, 2013 at 8:25 AM, Alaios wrote:
> Hi all,
> the following returns
On Nov 6, 2013, at 8:25 AM, Alaios wrote:
> Hi all,
> the following returns the hour and the minutes
>
> paste(DataSet$TimeStamps[selectedInterval$start,4],
> DataSet$TimeStamps[selectedInterval$start,5],sep=":")
> [1] "12:3"
>
> the problem is that from these two I want to create a time stamp
Hi all,
the following returns the hour and the minutes
paste(DataSet$TimeStamps[selectedInterval$start,4],
DataSet$TimeStamps[selectedInterval$start,5],sep=":")
[1] "12:3"
the problem is that from these two I want to create a time stamp so 12:03. The
problem is that the number 3 is not converte
5 matches
Mail list logo