Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 11 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
6 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
91 lignes
Copier tout
26 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
106 lignes
Copier tout
Copier
Copié
Copier
Copié
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")
Copier
Copié
Copier
Copié
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))
Copier
Copié
Copier
Copié
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))
Copier
Copié
Copier
Copié
format <- "%
M:%S
"
format <- "%
H:%M
"
}
}
Copier
Copié
Copier
Copié
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) {
Copier
Copié
Copier
Copié
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
Copier
Copié
Copier
Copié
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
Copier
Copié
Copier
Copié
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, ...)
Copier
Copié
Copier
Copié
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
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, ...) }
Texte modifié
Ouvrir un fichier
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, ...) }
Trouver la différence