Most voted "lubridate" questions
lubridate is an R package that makes it easier to work with date and time objects.
Learn more…11 questions
Sort by count of
-
7
votes2
answers4567
viewsHow to turn a string into Date format in R?
In the code below the dates are in the format: Mes Dia Ano. I need R to recognize the variable as date. #importa os dados library(XML)…
-
5
votes2
answers98
viewsConvert "2012-01-01" to "2012-Jan-01" in R
good morning. It’s my first post here. I just started my journey in "R" and I’m having a hard time with dates. I even managed to get to the result I wanted, however I took a turn, in my view, VERY…
-
3
votes4
answers101
viewsDealing with dates of heterogeneous formats in R
I have 236 files in . csv that have all the same columns. My goal is to join them all into one data frame only. However, each of them has 4 columns with date and time values. The problem is in the…
-
3
votes1
answer42
viewsNotice message by adding year, month and day with the ymd() function of the lubridate
I’m practicing with the pack hflights I install the package; I load the package; and I carry the lubridate install.packages("hflights") library(hflights) library(lubridate) The data (Year, Month,…
-
2
votes1
answer86
viewsNegative age in R
I have a database that I need to calculate the age of the limbs in it, below a sample taken with the dput. base.teste <- c("04/03/73", "10/09/67", "21/12/74", "17/04/76", "25/03/66", "11/03/73",…
-
2
votes1
answer77
viewsPlotting data evolution in time on R
Good afternoon, I’m having trouble plotting this data series over time. I would like to see the frequency of clients without CPF and without note per month, and how these indicators are evolving. I…
-
2
votes1
answer159
viewsGenerate a calendar in R
I need to generate a calendar with working days in R, but only for the current year. I am using the package bizdays to generate the days, but do not know a way to select only the current year. I…
-
1
votes1
answer93
viewsAdding an area shaded over a Plot in the R?
I’m making some graphs using R, and I need to make a highlight (shaded area in a given location), but I can only plot. Follow the image I can generate: The highlight has to be a rectangle that goes…
-
1
votes1
answer36
viewsThe "date" format disappears after using the "group_by" function followed by "summarise (Mean())" in R
I am working with the following global temperature database: https://drive.google.com/open?id=1nSwP3Y0V7gncbnG_DccNhrTRxmUNqMqa I import the data with the function import() package rio and engrave…
-
0
votes2
answers49
viewsConvert days to years using R lubridate
Assuming the following dataframe: library(dplyr) library(lubridate) df<-data.frame(inicio= ymd(19800101), fim=ymd(20200101)) %>% mutate(dif=fim-inicio) inicio fim dif 1 1980-01-01 2020-01-01…
-
-1
votes1
answer46
viewsDate manipulation using dplyr and lubridate
I have a date frame whose columns have dates (%Y/%m/%d), times and averages per hour over 4 months (01/01/2020 - 01/04/2020). I wonder how I could calculate the average of these hourly values, for…