Skip to content

Commit 7a793a8

Browse files
also update wday and wdayname in object M when file is split #1278
1 parent afbb126 commit 7a793a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

R/splitRecords.R

+6
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ splitRecords = function(metadatadir, params_general = NULL) {
139139
I$filename = filename_dir
140140
newRDataFileName = paste0(dirname(S$filename[j]), "/", newFileName, ".RData")
141141
file_was_split = TRUE
142+
143+
# update weekday code and name
144+
M$wday = as.POSIXlt(x = timestamp_short[1], tz = desiredtz)$wday
145+
weekdays = c("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
146+
M$wdayname = weekdays[M$wday + 1]
147+
# save
142148
save(M, C, I,
143149
filefoldername, filename_dir, tail_expansion_log,
144150
file = newRDataFileName)

0 commit comments

Comments
 (0)