I have a column of a table with dates, I need to create another column with random dates and after that date. I used the seq.Date function for this but I get the following error.
date_arq<-seq.Date(as.Date(base$DATE_END, "%Y-%m-%d"))
Error...
I have a database with 1441 rows. I need to group them into groups of 30, and draw averages from each of those subgroups. Is there any command that will allow me to do all this automatically? "every 30 rows, create a new column and calculate the...
I have two tables: dados and dados_aux . I need to add to the table dados the REGIÃO column, present in the dados_aux table.
However, I have to use two keys to join: CIDADE and UF . Otherwise, the i...
I have a data frame in which I have qualitative variables, such as sex and origin, and quantitative variables such as cholesterol, weight and height. It is possible to correlate these variables using the cor() function, when using it I ge...
Suppose there is a database where:
x y z
a 2015 122.4
a 2015 122.4
b 2016 200.5
a 2014 300.6
c 2016 80.1
What I was wondering is to do a programming in the R that transforms the repeated values of z of each group x and y in...
I need to create a vector with sequential dates between 01/01/2013 and 05/31/2018, but with repetitions, as shown below, associated with time.
01/01/2013 0:00
01/01/2013 1:00
01/01/2013 4:00
01/01/2013 8:00
01/01/2013 12:00
01/01/2013...
I'm trying to install the lodown package, but the following error appears and I can not solve:
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/archive’
Installation failed: Command fai...
In the frame date below, I want the days that have no gain information to be repeated based on the last information collected. For example from day 2 to day 15 the gain will be 0.97 and day 79 to 86 of 0.45 How can I do this in R?
Dia G...
In the boxplot view created with the script below, I do not think the g2, g3 and g4 graphics are the same ones that appear in the g1 image, but I could not find anything wrong with the code! Notice that the median or maximum...
I am simulating values of the Birnbaum-Saunders distribution with alpha and beta parameters and then try to estimate these values using the optimum function, although the simulation converges, I am getting the error below, how to correct this er...