Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
107 views

I'm working with date-time (POSIXct) observations. My workflow involves reading CSVs, manipulating the date-time data, and exporting as CSV for later use. I've found that without tediously specifying ...
MasonK's user avatar
  • 101
0 votes
0 answers
85 views

I have a column by name Time of character datatype and want to separate each hour,minute and seconds into different column.Please suggest me methods. EX: Time 12:29:38 18:01:39 08:56:...
Akshayd978's user avatar
1 vote
1 answer
86 views

Temperature is meaesured in each two minutes and temperatures between 2.0 and 7.9 are fine, 8.0 and above are hot, 0.0 and 1.9 are cold, and minus zero is too cold. I want to measure time in each ...
Erdem Erkoyun's user avatar
2 votes
3 answers
185 views

I am trying to calculate the next month in YYYY MMM (e.g. 2025 Jul) format using year and month as inputs. What I have is this: text <- "Current year is 2025" mon <- "06" ...
JontroPothon's user avatar
1 vote
1 answer
74 views

I am trying to use tidyverse to convert a POSIXct object with a time zone of UTC to an alternative known time zone. I've tried different variations of the with_tz() and force_tz() functions but all ...
tassones's user avatar
  • 1,898
0 votes
2 answers
93 views

I’m working with machine events data in R, where each event has a start and end time, a unique event code, and a precedence level (ordered factor). Events may overlap, and I need to transform this ...
Rahul Premraj's user avatar
2 votes
3 answers
115 views

My code runs but I get an NA for 2024-02-29 library(lubridate) my_date <- c(as.Date("2024-01-29"), as.Date("2024-02-29")) next_year <- my_date+months(12) next_year #> [1] ...
Moses's user avatar
  • 1,526
0 votes
1 answer
96 views

I have a dataframe in R with several ID, DAY and TIME and amount of a compound (AMT). Typically, for every ID, there should two records at every day, indicating two doses a day, typically in the ...
YHO's user avatar
  • 11
0 votes
3 answers
115 views

I have a dataset with dates in the format like 20170911. Normally with other datasets I work with as.Date from the lubridate package and it works out pretty well. However, when I apply the as.Date ...
USER12345's user avatar
  • 145
1 vote
2 answers
115 views

Trying to figure out why this doesn't work. What I'm looking to do is break up test_int_1 into 3 segements -> before test_init_2, test_init_2, after test_init_2. library(lubridate) test_int_1 <-...
user13317's user avatar
  • 507
0 votes
1 answer
77 views

I'm planning to collect data with microsecond-precision timestamps in the format "DD/MM/YY HH:MM:SS.mmmuuun"? How would I parse in R and keep working in a dplyr pipeline? Example: "26/...
Bhav Shah's user avatar
  • 177
1 vote
1 answer
73 views

I have camera trap data where I want to remove potentially duplicated animal detections. I am setting the interval as 60min (1 hour) so that any individual detected of the same species at the same ...
Amanda Goldberg's user avatar
0 votes
1 answer
55 views

I have a large data.frame of about a million records. I'm trying to use lubridate to fix some dates and I get strange behavior. When I run it on the whole data.frame, it isn't able to parse any ...
Tom's user avatar
  • 5,102
3 votes
1 answer
65 views

Example data are as follows: library(dplyr) library(lubridate) library(tidyr) set.seed(123) dummy_data <- tibble( focalbear_event = rep(c("event1", "event2"), each = 10), ...
kalex's user avatar
  • 83
0 votes
2 answers
62 views

I have data on water intensity that was collected every hour over many months (below is a subset of data). I need the first date that intensity was greater than 900 but only if it was greater than or ...
Amanda Goldberg's user avatar
0 votes
0 answers
92 views

I am importing multiple csv files from one folder and I've noticed that when I do a conversion to convert a character datetime stamp, the year will read as '0024' rather than '2024'. How do I fix it ...
EtoiledeMoyenOrient's user avatar
1 vote
3 answers
63 views

I have a set of data with precipitation totals (Precip) for every day. I collected data at multiple pools. I need to calculate the number of days it has been since the last time it raied >12mm. If ...
Amanda Goldberg's user avatar
1 vote
1 answer
54 views

Dear Stackoverflow Community, I'm currently working with a dataset that contains start and end dates for individual travelers. However, I'm only interested in measuring the duration of time in days ...
SugarRay's user avatar
0 votes
3 answers
58 views

I have a dataset with dates formatted like this: > head(dfed$`POSTED DATE`) [1] NA [2] "Fri, 26 Jul 2024 00:00:00 (Brussels local time)" [3] ...
anakar's user avatar
  • 366
3 votes
3 answers
310 views

I want to convert milliseconds values in my data to minutes and seconds (in the format MM:SS e.g. a value of 1772094 should become 29:32). The toy data looks like this: df <- data.frame( ID = c(&...
Jay Bee's user avatar
  • 570
0 votes
2 answers
35 views

I am trying to clean some tables in r and I have two columns that are in date time value. I know that date time value cells are difficult to deal with. Part of my problem is that the cells are mixed ...
Bryce's user avatar
  • 11
-1 votes
2 answers
121 views

I'm trying to take data from a nearly-weekly snapshot [some weeks are missing due to holidays, server issues, etc.] and determine the number of service dates between one snapshot and the next. I have ...
Morrigan's user avatar
0 votes
1 answer
82 views

I am currently trying to plot the effort in sampling for my masters thesis, which looks something similar to this: Figure 1: So i have data for 3 years, and i want to reflect the exact days of the ...
Angaro's user avatar
  • 3
0 votes
1 answer
34 views

I want to create a variable Date from 3 variables in my dataframe : data <- data %>% mutate(Z49= if_else( !is.na(Z49j) & !is.na(Z49m) & !is.na(Z49a) & Z49j != "&...
Alif's user avatar
  • 28
2 votes
0 answers
176 views

I recently updated to R version 4.4 and lubridate version 1.9.3 and started getting this error below when I try to add a period of time to a posixct variable. Error in C_time_add(time, periods, ...
user25209989's user avatar

1
2 3 4 5
53