Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
11 years ago
Diff never expires
Clear
Export
Share
Explain
6 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
91 lines
Copy
26 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
106 lines
Copy
Copy
Copied
Copy
Copied
function (side, x, at, format, labels = TRUE,
...)
function (side, x, at, format, labels = TRUE,
n = 5,
...)
{
{
mat <- missing(at) || is.null(at)
mat <- missing(at) || is.null(at)
if (!mat)
if (!mat)
x <- as.POSIXct(at)
x <- as.POSIXct(at)
else x <- as.POSIXct(x)
else x <- as.POSIXct(x)
range <- par("usr")[if (side%%2)
range <- par("usr")[if (side%%2)
1L:2L
1L:2L
else 3L:4L]
else 3L:4L]
d <- range[2L] - range[1L]
d <- range[2L] - range[1L]
z <- c(range, x[is.finite(x)])
z <- c(range, x[is.finite(x)])
attr(z, "tzone") <- attr(x, "tzone")
attr(z, "tzone") <- attr(x, "tzone")
Copy
Copied
Copy
Copied
if (d < 1.1 *
60
) {
if (d < 1.1 ) {
sc <- 0.001
if (missing(format))
format <- "%H:%M:%OS6"
}
else
if (d < 1.1 *
30
) {
sc <- 1
sc <- 1
if (missing(format))
if (missing(format))
Copy
Copied
Copy
Copied
format <- "
%S"
format <- "
%H:%M:%OS3"
}
else if (d < 1.1 * 60) {
sc <- 1
if (missing(format))
format <- "%H:%M:%S"
}
else if (d < 1.1 * 30 * 60) {
sc <- 60
if (missing(format))
format <- "%H:%M:%S"
}
}
else if (d < 1.1 * 60 * 60) {
else if (d < 1.1 * 60 * 60) {
sc <- 60
sc <- 60
if (missing(format))
if (missing(format))
Copy
Copied
Copy
Copied
format <- "%
M:%S
"
format <- "%
H:%M
"
}
}
Copy
Copied
Copy
Copied
else if (d < 1.
1
* 60 * 60 * 24) {
else if (d < 1.
3
* 60 * 60 * 24) {
sc <- 60 * 60
sc <- 60 * 60
if (missing(format))
if (missing(format))
format <- "%H:%M"
format <- "%H:%M"
}
}
else if (d < 2 * 60 * 60 * 24) {
else if (d < 2 * 60 * 60 * 24) {
sc <- 60 * 60
sc <- 60 * 60
if (missing(format))
if (missing(format))
format <- "%a %H:%M"
format <- "%a %H:%M"
}
}
else if (d < 7 * 60 * 60 * 24) {
else if (d < 7 * 60 * 60 * 24) {
sc <- 60 * 60 * 24
sc <- 60 * 60 * 24
if (missing(format))
if (missing(format))
format <- "%a"
format <- "%a"
}
}
else {
else {
sc <- 60 * 60 * 24
sc <- 60 * 60 * 24
}
}
if (d < 60 * 60 * 24 * 50) {
if (d < 60 * 60 * 24 * 50) {
Copy
Copied
Copy
Copied
zz <- pretty(z/sc
)
zz <- pretty(z/sc
,n=n
)
z <- zz * sc
z <- zz * sc
z <- .POSIXct(z, attr(x, "tzone"))
z <- .POSIXct(z, attr(x, "tzone"))
if (sc == 60 * 60 * 24)
if (sc == 60 * 60 * 24)
z <- as.POSIXct(round(z, "days"))
z <- as.POSIXct(round(z, "days"))
if (missing(format))
if (missing(format))
format <- "%b %d"
format <- "%b %d"
}
}
else if (d < 1.1 * 60 * 60 * 24 * 365) {
else if (d < 1.1 * 60 * 60 * 24 * 365) {
z <- .POSIXct(z, attr(x, "tzone"))
z <- .POSIXct(z, attr(x, "tzone"))
zz <- as.POSIXlt(z)
zz <- as.POSIXlt(z)
zz$mday <- zz$wday <- zz$yday <- 1
zz$mday <- zz$wday <- zz$yday <- 1
zz$isdst <- -1
zz$isdst <- -1
zz$hour <- zz$min <- zz$sec <- 0
zz$hour <- zz$min <- zz$sec <- 0
Copy
Copied
Copy
Copied
zz$mon <- pretty(zz$mon
)
zz$mon <- pretty(zz$mon
,n=n
)
m <- length(zz$mon)
m <- length(zz$mon)
M <- 2 * m
M <- 2 * m
m <- rep.int(zz$year[1L], m)
m <- rep.int(zz$year[1L], m)
zz$year <- c(m, m + 1)
zz$year <- c(m, m + 1)
zz <- lapply(zz, function(x) rep(x, length.out = M))
zz <- lapply(zz, function(x) rep(x, length.out = M))
zz <- .POSIXlt(zz, attr(x, "tzone"))
zz <- .POSIXlt(zz, attr(x, "tzone"))
z <- as.POSIXct(zz)
z <- as.POSIXct(zz)
if (missing(format))
if (missing(format))
format <- "%b"
format <- "%b"
}
}
else {
else {
z <- .POSIXct(z, attr(x, "tzone"))
z <- .POSIXct(z, attr(x, "tzone"))
zz <- as.POSIXlt(z)
zz <- as.POSIXlt(z)
zz$mday <- zz$wday <- zz$yday <- 1
zz$mday <- zz$wday <- zz$yday <- 1
zz$isdst <- -1
zz$isdst <- -1
zz$mon <- zz$hour <- zz$min <- zz$sec <- 0
zz$mon <- zz$hour <- zz$min <- zz$sec <- 0
Copy
Copied
Copy
Copied
zz$year <- pretty(zz$year
)
zz$year <- pretty(zz$year
,n=n
)
M <- length(zz$year)
M <- length(zz$year)
zz <- lapply(zz, function(x) rep(x, length.out = M))
zz <- lapply(zz, function(x) rep(x, length.out = M))
z <- as.POSIXct(.POSIXlt(zz))
z <- as.POSIXct(.POSIXlt(zz))
if (missing(format))
if (missing(format))
format <- "%Y"
format <- "%Y"
}
}
if (!mat)
if (!mat)
z <- x[is.finite(x)]
z <- x[is.finite(x)]
keep <- z >= range[1L] & z <= range[2L]
keep <- z >= range[1L] & z <= range[2L]
z <- z[keep]
z <- z[keep]
if (!is.logical(labels))
if (!is.logical(labels))
labels <- labels[keep]
labels <- labels[keep]
else if (identical(labels, TRUE))
else if (identical(labels, TRUE))
labels <- format(z, format = format)
labels <- format(z, format = format)
else if (identical(labels, FALSE))
else if (identical(labels, FALSE))
labels <- rep("", length(z))
labels <- rep("", length(z))
axis(side, at = z, labels = labels, ...)
axis(side, at = z, labels = labels, ...)
Copy
Copied
Copy
Copied
}
}
Saved diffs
Original text
Open file
function (side, x, at, format, labels = TRUE, ...) { mat <- missing(at) || is.null(at) if (!mat) x <- as.POSIXct(at) else x <- as.POSIXct(x) range <- par("usr")[if (side%%2) 1L:2L else 3L:4L] d <- range[2L] - range[1L] z <- c(range, x[is.finite(x)]) attr(z, "tzone") <- attr(x, "tzone") if (d < 1.1 * 60) { sc <- 1 if (missing(format)) format <- "%S" } else if (d < 1.1 * 60 * 60) { sc <- 60 if (missing(format)) format <- "%M:%S" } else if (d < 1.1 * 60 * 60 * 24) { sc <- 60 * 60 if (missing(format)) format <- "%H:%M" } else if (d < 2 * 60 * 60 * 24) { sc <- 60 * 60 if (missing(format)) format <- "%a %H:%M" } else if (d < 7 * 60 * 60 * 24) { sc <- 60 * 60 * 24 if (missing(format)) format <- "%a" } else { sc <- 60 * 60 * 24 } if (d < 60 * 60 * 24 * 50) { zz <- pretty(z/sc) z <- zz * sc z <- .POSIXct(z, attr(x, "tzone")) if (sc == 60 * 60 * 24) z <- as.POSIXct(round(z, "days")) if (missing(format)) format <- "%b %d" } else if (d < 1.1 * 60 * 60 * 24 * 365) { z <- .POSIXct(z, attr(x, "tzone")) zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 zz$hour <- zz$min <- zz$sec <- 0 zz$mon <- pretty(zz$mon) m <- length(zz$mon) M <- 2 * m m <- rep.int(zz$year[1L], m) zz$year <- c(m, m + 1) zz <- lapply(zz, function(x) rep(x, length.out = M)) zz <- .POSIXlt(zz, attr(x, "tzone")) z <- as.POSIXct(zz) if (missing(format)) format <- "%b" } else { z <- .POSIXct(z, attr(x, "tzone")) zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 zz$mon <- zz$hour <- zz$min <- zz$sec <- 0 zz$year <- pretty(zz$year) M <- length(zz$year) zz <- lapply(zz, function(x) rep(x, length.out = M)) z <- as.POSIXct(.POSIXlt(zz)) if (missing(format)) format <- "%Y" } if (!mat) z <- x[is.finite(x)] keep <- z >= range[1L] & z <= range[2L] z <- z[keep] if (!is.logical(labels)) labels <- labels[keep] else if (identical(labels, TRUE)) labels <- format(z, format = format) else if (identical(labels, FALSE)) labels <- rep("", length(z)) axis(side, at = z, labels = labels, ...) }
Changed text
Open file
function (side, x, at, format, labels = TRUE, n = 5, ...) { mat <- missing(at) || is.null(at) if (!mat) x <- as.POSIXct(at) else x <- as.POSIXct(x) range <- par("usr")[if (side%%2) 1L:2L else 3L:4L] d <- range[2L] - range[1L] z <- c(range, x[is.finite(x)]) attr(z, "tzone") <- attr(x, "tzone") if (d < 1.1 ) { sc <- 0.001 if (missing(format)) format <- "%H:%M:%OS6" } else if (d < 1.1 * 30) { sc <- 1 if (missing(format)) format <- "%H:%M:%OS3" } else if (d < 1.1 * 60) { sc <- 1 if (missing(format)) format <- "%H:%M:%S" } else if (d < 1.1 * 30 * 60) { sc <- 60 if (missing(format)) format <- "%H:%M:%S" } else if (d < 1.1 * 60 * 60) { sc <- 60 if (missing(format)) format <- "%H:%M" } else if (d < 1.3 * 60 * 60 * 24) { sc <- 60 * 60 if (missing(format)) format <- "%H:%M" } else if (d < 2 * 60 * 60 * 24) { sc <- 60 * 60 if (missing(format)) format <- "%a %H:%M" } else if (d < 7 * 60 * 60 * 24) { sc <- 60 * 60 * 24 if (missing(format)) format <- "%a" } else { sc <- 60 * 60 * 24 } if (d < 60 * 60 * 24 * 50) { zz <- pretty(z/sc,n=n) z <- zz * sc z <- .POSIXct(z, attr(x, "tzone")) if (sc == 60 * 60 * 24) z <- as.POSIXct(round(z, "days")) if (missing(format)) format <- "%b %d" } else if (d < 1.1 * 60 * 60 * 24 * 365) { z <- .POSIXct(z, attr(x, "tzone")) zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 zz$hour <- zz$min <- zz$sec <- 0 zz$mon <- pretty(zz$mon,n=n) m <- length(zz$mon) M <- 2 * m m <- rep.int(zz$year[1L], m) zz$year <- c(m, m + 1) zz <- lapply(zz, function(x) rep(x, length.out = M)) zz <- .POSIXlt(zz, attr(x, "tzone")) z <- as.POSIXct(zz) if (missing(format)) format <- "%b" } else { z <- .POSIXct(z, attr(x, "tzone")) zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 zz$mon <- zz$hour <- zz$min <- zz$sec <- 0 zz$year <- pretty(zz$year,n=n) M <- length(zz$year) zz <- lapply(zz, function(x) rep(x, length.out = M)) z <- as.POSIXct(.POSIXlt(zz)) if (missing(format)) format <- "%Y" } if (!mat) z <- x[is.finite(x)] keep <- z >= range[1L] & z <= range[2L] z <- z[keep] if (!is.logical(labels)) labels <- labels[keep] else if (identical(labels, TRUE)) labels <- format(z, format = format) else if (identical(labels, FALSE)) labels <- rep("", length(z)) axis(side, at = z, labels = labels, ...) }
Find difference