Skip to content

Commit

Permalink
use "." as seperator; #702
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Aug 27, 2024
1 parent 0a321cc commit 8ad9272
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ st_as_sf.stars = function(x, ..., as_points = FALSE, merge = FALSE, na.rm = TRUE
else { # another exception... time as second dimension
e = expand_dimensions(x)
if (length(e[-ix]) == 1 && inherits(e[-ix][[1]], c("Date", "POSIXt", "PCICt"))) {
names(df) = if (length(nc) > 1)
do.call(paste, rev(expand.grid(e[-ix][[1]], names(x))))
else
names(df) = if (length(nc) > 1) {
nm = expand.grid(e[-ix][[1]], names(x))
paste(nm[[2]], nm[[1]], sep = ".")
} else
as.character(e[-ix][[1]])
}
}
Expand Down

0 comments on commit 8ad9272

Please sign in to comment.