search for: two_digits

Displaying 2 results from an estimated 2 matches for "two_digits".

2008 May 20
2
need some help in plotting xy graph
..., rot=0) ## z is a chron object {browser() ## how many days do the data span? n.days <- ceiling(diff(range(z, na.rm = TRUE))) ## compute x ticks, pretty labels x <- as.numeric(z) r <- range(x, na.rm = TRUE) at.x <- seq(from = r[1], to = r[2], length = 7) two_digits <- function(x){ x <- paste("0", x, sep="") substring(x,nchar(x)-1) } ## heuristics: use hh:mm when range of data falls within one day, ## otherwise use MM-DD hh:mm. at.z <- chron(at.x) hh <- paste(two_digits(hours(at.z)), two_d...
2008 May 21
2
need some help in plotting xy graph
..., rot=0) ## z is a chron object {browser() ## how many days do the data span? n.days <- ceiling(diff(range(z, na.rm = TRUE))) ## compute x ticks, pretty labels x <- as.numeric(z) r <- range(x, na.rm = TRUE) at.x <- seq(from = r[1], to = r[2], length = 7) two_digits <- function(x){ x <- paste("0", x, sep="") substring(x,nchar(x)-1) } ## heuristics: use hh:mm when range of data falls within one day, ## otherwise use MM-DD hh:mm. at.z <- chron(at.x) hh <- paste(two_digits(hours(at.z)), two_d...