Questions tagged as 'r'

1
answer

How to make dates difference in R?

dataset <- structure(list(PLACA = structure(c(5L, 5L, 5L, 4L, 1L, 2L, 3L, 7L, 6L, 8L), .Label = c("DSF9652", "EFR9618", "EQW6597", "ERB1522", "EWM3539", "LOC1949", "LQQ5554", "OQT5917"), class = "factor"), COD_REV = c(113195L, 113196L,...
asked by 12.04.2018 / 14:21
1
answer

Presentation of data in ggplot2

Hello, I'm having problems with ggplot2 in a histogram. The code: ggplot(data.combined[1:891,], aes(x = Age, fill=Survived)) + facet_wrap(~Sex + Pclass) + geom_histogram(binwidth = 10) + xlab ("Age") + ylab ("Total Count") Wi...
asked by 22.05.2016 / 18:51
1
answer

How to make a profile graph in R?

I'm trying to create a profile graph for this data frame that I titled "Femi": Thisisthedatacode:structure(list(oito=c(21,21,20.5,23.5,21.5,20,21.5,23,20,16.5,24.5),dez=c(20,21.5,24,24.5,23,21,22.5,23,21,19,25),doze=c(21.5,24,24.5,25,22.5,21...
asked by 13.05.2016 / 03:18
1
answer

How to order boxplots by the mean or median in R

How to order a series of boxplots by medium or medium? The command used: boxplot(base$y~base$FID) sorts the graphics in the order of the base variable $ FID, I would need the ordering to be done by the mean or median of the base variab...
asked by 18.05.2016 / 02:51
1
answer

Perform a filter and save in csv

I would like to perform a filter in R. I have a database with 5 variables and more than 5000 rows. One of my variables is "room", in which I have 29 room (ex: room 1, room 2 ...). I would like to perform a filter, to filter all the informatio...
asked by 13.04.2015 / 17:22
2
answers

Data manipulation with inline dates for column

I have a rather difficult database to work with: The code variable is 141 different. What I wanted to do is create a data.frame that had code as a variable (header) and so had a sequence of days in a row for each code. A column would also be...
asked by 19.04.2015 / 19:00
1
answer

How to color the legend according to the chart in R

Hello everyone, I have a chart in R and would like to make the caption equal to the chart. below is the command used and the graphic image. control = c(100,100,100,100,100) dez = c(100,90,0,0,0) cinco = c(100,100,100,50,0) dois = c(100,100,100...
asked by 24.03.2017 / 16:49
2
answers

How to change the orientation of the "Key" of a Legend in ggplot?

How can I change the caption key below so that it is in the horizontal position without changing the vertical lines of the chart. Also, how do you leave the caption background with the same color as the first layer (or "layer") of the graphic?...
asked by 21.03.2017 / 20:58
1
answer

Scrape of the mediating system of the MTE

I'm trying to do the scrape of the Ministry of Labor mediator system. Basically, I want the relation of collective agreements and conventions: url1<-"http://www3.mte.gov.br/sistemas/mediador/ConsultarInstColetivo" Once I access this page...
asked by 26.04.2017 / 14:35
1
answer

Problem with forecast in R

I'm trying to make a relatively simple GDP forecast, but I'm finding the following error: **Error in model.frame.default(formula = y ~ t2, drop.unused.levels = TRUE) : comprimentos das variáveis diferem (encontradas em 't2')** Here's the...
asked by 26.04.2017 / 20:35