Skip to content

Commit

Permalink
Do no lose names.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87600 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jan 19, 2025
1 parent d05f01d commit da26644
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/library/base/R/datetime.R
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,12 @@ as.data.frame.difftime <- as.data.frame.vector

format.difftime <- function(x,...)
{
if(length(x))
y <- if(length(x))
paste(format(unclass(x),...), units(x))
else
character()
names(y) <- names(x)
y
}

print.difftime <- function(x, digits = getOption("digits"), ...)
Expand Down

0 comments on commit da26644

Please sign in to comment.