Skip to content

Commit

Permalink
Normalizes names of samples columns
Browse files Browse the repository at this point in the history
  • Loading branch information
vwmaus committed Sep 25, 2023
1 parent c3dbbf1 commit 6704f05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: dtwSat
Type: Package
Title: Time-Weighted Dynamic Time Warping for Satellite Image Time Series Analysis
Version: 1.0.0
Date: 2023-09-22
Version: 1.0-1
Date: 2023-09-25
Authors@R:
c(person(given = "Victor",
family = "Maus",
Expand Down
4 changes: 4 additions & 0 deletions R/train.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ twdtw_knn1 <- function(x, y, time_weight, cycle_length, time_scale,
stop(paste("Missing required columns in y:", paste(missing_columns, collapse = ", ")))
}

# adjust y column names
st_geometry(y) <- 'geom'
y <- y[, c(start_column, end_column, label_colum, 'geom')]

# Convert columns to date-time
y[, start_column] <- to_date_time(y[[start_column]])
y[, end_column] <- to_date_time(y[[end_column]])
Expand Down

0 comments on commit 6704f05

Please sign in to comment.