All Questions
146 questions
0
votes
3
answers
90
views
Subset dataset based on dates in entire dataset [closed]
I am working with a dataset in R.
The dataset has with MANY date variables and I want to subset the data frame based on dates between 2023-01-01 and 2023-12-31.
I know I can use the command based on ...
0
votes
2
answers
64
views
Filtering my data frame is erasing my data frame despite correct number of rows
I have a dataframe of transactions (roughly 76K rows). Each row has a column called START_DATE which is when the transaction started.
I am trying to filter down to transactions with START_DATE > 1/...
0
votes
0
answers
53
views
How to change the range of dates in an existing column R studio
I have a dataset that looks like this:
d.date agesincetaggingdays rf8fitted n freq taggingdate
1 2018-09-19 69 Active 3 0.027777778 2018-07-12
3 2018-09-21 ...
1
vote
1
answer
51
views
Running into issues with subsetting after subtracting dates?
I am running into issues with subsetting after subtracting dates using lubridate. I have a dataframe:
customerid <- c("A1", "A1", "A2", "A2", "A3", ...
1
vote
3
answers
73
views
Subset entries in each group based on dates and groups stored in another dataframe
I want to remove rows in dataframe1 with a date that occurs before the date in dataframe2, based on the specific course.
Dataframe1 that looks like this:
Participant ID
Course
Date
1
BIO 110
2022-02-...
0
votes
1
answer
87
views
How do I subset observations from first data frame with start and end dates interval in which the second data frame's observation date falls in R?
I have the two datasets (for example df and df1) and I would like to subset observations from the first dataset (df) that have date ranges in which observation date from second dataset (df1) falls ...
1
vote
2
answers
184
views
How do I filter out data based on a value in column while capturing minimum date criteria in another column?
I need to get a limited data based on the criteria of Ind being 'Y'. But it should only capture the first row when Ind changes from 'N' or 'O' value to 'Y'. In the Check_Date it should update that ...
0
votes
0
answers
43
views
R - Selecting control group days days close to observation times
I have a set of many different kind of observations that contain the Date of observations on special days (sam1, sam2, sam3). My aim is now to perform a wilcox.test() to find out if there is a ...
0
votes
1
answer
31
views
Select specific dates in dataframe in r
I have a dataframe waterlevels which consists of data from nine piezometers for the year 2021. The groundwater levels were measured each 15 minutes. This is the head of the df:
dateandtime ...
0
votes
1
answer
46
views
Selecting a data range using months and date over a period of years?
I am beginner in R. I have a data.frame in which frequencies in one column and dates in other column. I would like to extract counts for two halves of a month, i.e., 1st to 15th and 16th to 31st. The ...
0
votes
1
answer
86
views
subset first and last date and calculate euclidean distance
I have a dataset with a column of dates Datum. These dates have coordinates in Longitude and Latitude and belong to an unique ID called HEX_Tag_ID. I want to calculate the distance in meters between ...
1
vote
1
answer
108
views
Creating new dataset with only the most recent date
I am trying to create a new table where table1 is grouped by ID and only the most recent date is picked from table1$new.
I have the tables below:
1st Table:
ID
Status
Date
001
1003
2021-02-01
001
1003
...
1
vote
1
answer
851
views
Delete duplicates and keep one line depending on variable and earliest date
I need to subset dataframe d and I like to keep one line for each ID number. But lines kept should either include I50 in AD or BD, and only the one with the earliest date should be kept.
So lastly we ...
1
vote
2
answers
424
views
Splitting data frame into segments for each factor based on a cutoff value in a column in R
I am currently working with a dataframe that contains observations with a corresponding timestamp. Please see below for a subsample of the data set.
Now, I would like to split the df into smaller ...
0
votes
0
answers
359
views
Subset month, day, hour, minute, second from a date [duplicate]
I have a column in a dataframe which contains dates eg:
Date <- as.Date("2012-12-01 00:00:00")
Note: the actual dataframe format is "unknown"
I want to subset the month, date, ...