Posts by Andreia Almeida • 183 points
7 posts
-
3
votes1
answer167
viewsQ: How to partially disregard NA in R operations with a historical data series?
I have a set of rain data measured every hour and I need to add this data throughout the day. For this, I am using the commands below: library(dplyr) df %>% group_by(data) %>%…
-
3
votes2
answers237
viewsA: How to create an array with repeating dates?
The vector can be obtained from the function seq(from, to, by= ), indicating the end point of the sequence, designated by by, as an example below. > data <- seq(as.Date('2013/01/01',…
ranswered Andreia Almeida 183 -
3
votes2
answers237
viewsQ: How to create an array with repeating dates?
I need to create a vector with sequential dates between 01/01/2013 and 05/31/2018, but with repetitions, as an example below, associated with time. 01/01/2013 0:00 01/01/2013 1:00 01/01/2013 4:00…
rasked Andreia Almeida 183 -
0
votes0
answers507
viewsQ: How to insert lines in specific locations in a data frame?
I need to insert rows in the "Feb" column on days 30 and 31 that are filled in with "NA" so that the data contained in the rows is moved downwards. I tried to fev$novaLin <- with(fev,…
rasked Andreia Almeida 183 -
2
votes2
answers3944
viewsQ: How to transpose rows into columns in a data frame?
I have a time series with daily precipitation data between 1961 and 2017, as an example below. I need to group these data by month over the years. I was able to transpose the "month" column of the…
rasked Andreia Almeida 183 -
3
votes2
answers349
viewsQ: How to insert missing dates into a data frame?
I have a time series with 30 years of data that presents filling failures. As noted in the example below, a few days were not recorded (1961-08-19,1961-08-20,1961-08-21...). How do I identify and…
rasked Andreia Almeida 183 -
3
votes1
answer587
viewsQ: How to group information into a data frame from missing data?
I need to exclude empty lines from the df of a 30-year time series, with three daily measurements for each variable. I have already used the function subset(x, ...) that solves part of the problem.…