Posts by Arthur Baldini • 99 points
4 posts
-
3
votes3
answers91
viewsQ: Is it possible to pair values of two dataframes with different observation numbers?
I have two data frames: Sexo <- rep(1:2 , length.out = 51) Estudo <- rep(1: 17, length.out = 51) Salário <- c(runif(51, min=900, max=3000)) data1 <- data.frame(Sexo, Estudo, Salário)…
rasked Arthur Baldini 99 -
2
votes1
answer120
viewsQ: Calculating rates in R
I have the following dataframe: data <- data.frame(Individuo=c("1","2","3","4","5","6"), Sexo=c(2,4,4,2,4,2),Ocupaçao=c(1,1,2,2,1,2), Raça=c("Branco","Negro","Pardo","Branco","Pardo","Branco"),…
-
3
votes1
answer1331
viewsQ: How to join two data.frames in R with different variables and out of order?
I have two date frames.: frame1 <- data.frame(dia=c("02/01/2017","03/01/2017","04/01/2017","05/01/2017"), y=c(2,2,1,2),w=c(4,4,2,2),z=c(25,16,24,30), k=c("sim","nao","sim","nao")) frame2 <-…
-
1
votes1
answer1618
viewsQ: How to create a column in R under specific conditions?
Consider the following data.frame: data <- data.frame(x=c("a","b","c","d"), y=c(2,2,1,2),w=c(4,4,2,2),z=c(25,16,24,30), k=c("sim","nao","sim","nao")) How to include a new column where we will…
rasked Arthur Baldini 99