python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to get time difference in days since last date (lag) in R using datatable?
person_id diag_date concept_id event diff_prev_event
1: 1 2012-01-15 4265600 comorb NA secs
2: 1 2012-01-15 201820 comorb 0 secs
3: 1 2012-03-15 42...
sutsabs
Votes: 0
Answers: 1
Calculating numbers of week for a specific time period
Hi I have this data frame which contains the start and end dates of healthcare services. It looks like this:
id <- c("A", "B", "B", "C", "D")
start...
j1234
Votes: 0
Answers: 1
Remove rows that are within 12 months of each other for each participant across 15 years
I am new to R.
I have a large dataset that goes over 15 years (2007-2022) (see below an example portion). Essentially, I want to create a 12-month rolling window and remove the rows within 12 months o...
Jess H
Votes: 0
Answers: 1
difftime returns 0 in C++
I am trying to calculate the elapsed time between the date a book was borrowed and today, but difftime always returns 0.
This is what I have :
#include <string>
#include <iostream>
#includ...
user18160927
Votes: 0
Answers: 0