I have a dataframe with daily precipitation data, with dates from 01/01/1900 until 12/31/2010, example:
# Data Est_1 Est_2 Est_3
# 17/12/2010 NA 0 0
# 18/12/2010 NA 0...
I have a dataset and would like to select only the smallest value between each primary key. Here is the example of my DF:
ORDEM <- c(1,5,2,3,1,10)
GUIA <- c('111','111','333','333','555','555')
COR <- c('AZUL','AMARELO','PRETO','LARAN...
Good afternoon.
It's my first time in the stack, I'm a beginner in R , and my doubts are pretty basic.
I need to generate a sample of 1000 observations of a W distribution function. W is a discrete random variable, whic...
I need to split the elements of an array by its column mean, how can I do this, is there any function to perform this simple operation?
Considering the array:
> A <- matrix(1:16, ncol = 4)
> A
[,1] [,2] [,3] [,4]
[1,]...
I am plotting the following data in R to generate a bar graph:
structure(c(5483L, 28034L, 7995L, 5199L, 6785L, 7452L, 7692L), .Dim = 7L, .Dimnames = structure(list(c("dom", "qua", "qui", "sáb", "seg", "sex", "ter")), .Names = ""), class = "tab...
Suppose I have an interest in the iris dataset, already present in R memory:
head(iris)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9...
I have a database where variables assume integers from 1 to 5.
Here is an example base with the variables X1 , X2 and X3 :
base<- rbind(
c(5,3,3),c(4,3,2),c(4,5,4),c(1,5,1),c(1,2,1),c(3,4,2),
c(2,3,2),c(3,1,3),c(3,2,4)...
How do I insert the legend in this chart, what kind of bar would be the gross total and the line the total net?
lines = 'Mes Acid Obt
Jan 1450 102
Fev 1447 86
Mar 1461 87
Abr 1356 61
Mai 1398 80
Jun 1115 87
Jul 1211 82
A...
I need R to tell me the month before we are, that is, we are in "2018-05" and I need him to give me "2018-04". So far my solution was:
format(Sys.Date()-as.integer(format(Sys.Date(), "%d")),"%Y-%m")
I believe there should be a more "clean"...
I just downloaded PNGE 2013 from IBGE - and I tried to open it with the package for R that IBGE made, IBGEPesq. It is available as a .zip file at this address:
ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domi...