# HG changeset patch # User greg # Date 1533127640 14400 # Node ID 869e7d06bdf3a8e13e4259fe226d410ccfa86279 # Parent 0d9a74365270db5a50ad1a97c41e96b547c13af0 Uploaded diff -r 0d9a74365270 -r 869e7d06bdf3 extract_ipm_date_interval.R --- a/extract_ipm_date_interval.R Wed Aug 01 08:47:08 2018 -0400 +++ b/extract_ipm_date_interval.R Wed Aug 01 08:47:20 2018 -0400 @@ -52,19 +52,6 @@ # Display the total number of days in the Galaxy history item blurb. cat("Number of days in date interval: ", num_days, "\n"); -# Get the year from the start_date. -year = get_year_from_date(start_date); -# Get the DOY for start_date and end_date. -start_date_doy = as.integer(strftime(start_date, format="%j")); -end_date_doy = as.integer(strftime(end_date, format="%j")); -# Get the ticks date labels for plots. -ticks_and_labels = get_x_axis_ticks_and_labels(temperature_data_frame, date_interval=TRUE); -ticks = c(unlist(ticks_and_labels[1])); -date_labels = c(unlist(ticks_and_labels[2])); -# All latitude values are the same, so get the value -# for plots from the first row. -latitude = temperature_data_frame$LATITUDE[1]; - input_files = list.files(path=input_dir, full.names=TRUE); for(input_file in input_files) { temperature_data_frame = get_new_temperature_data_frame(input_file); @@ -72,6 +59,13 @@ end_date_row = which(temperature_data_frame$DATE==end_date); # Extract the date interval. temperature_data_frame = temperature_data_frame[start_date_row:end_date_row,]; + # Get the ticks date labels for plots. + ticks_and_labels = get_x_axis_ticks_and_labels(temperature_data_frame, date_interval=TRUE); + ticks = c(unlist(ticks_and_labels[1])); + date_labels = c(unlist(ticks_and_labels[2])); + # All latitude values are the same, so get the value + # for plots from the first row. + latitude = temperature_data_frame$LATITUDE[1]; # Save the date interval data into an output file # named the same as the input. file_path = paste("output_data_dir", input_file, sep="/");