Questions tagged as 'r'

1
answer

Filter in dplyr with constraint by max variable value of db gapminder

I am filtering on df gapminder , generating% void% when I use the df variable: library(gapminder) # versão 0.2.0 library(dplyr) # versão 0.7.2 gapminder %>% filter(year == 2007, gdpPercap==max(gdpPercap)) # A tibb...
asked by 09.01.2018 / 12:32
1
answer

How to change the font in a chart in R?

I want to use use the font Times New Roman in the chart, but the R / rstudio returns an error message saying can not find it. Obviously the font is somewhere because I use it in MS Word , for example. Some time ago the following command...
asked by 03.12.2017 / 22:34
1
answer

Organize a time series

I have a base with information collected on weight gain per animal. They were collected at different intervals for each animal. Follow part of the base just below Animal Dia Ganho 5 2 0.99 5 9 1.01 5 16 1.03 5 23 1.08 5 30 1.08 5 37...
asked by 27.11.2017 / 10:07
1
answer

Column graph of a Data Frame using GGPLOT

I have this data.frame: A K1 B K2 C K3 D K4 E K5 1 0.89386498 0.239258200 -0.004970278 0.99477685 -0.243845617 0.80370370 0.3132989 0.637155451 -0....
asked by 10.08.2016 / 18:14
1
answer

Endpoint function problem R

I'm working with this data.frame: St <- data.frame(read.csv2("interest_LastMonthDay.csv")) Date AAA_S.t. Date.1 BBB_S.t. Date.2 CCC_S.t. 1 27/12/88 1,80400 28/12/88 0,8368 28/12/88 0,0080 2 28/12/88 1,7...
asked by 24.06.2016 / 19:10
1
answer

Why does rvest break when processing an empty file?

When trying to process the contents of an empty file, the rvest package locks and closes RStudio . Here is a small replay of the problem: tf <- tempfile() file.create(tf) html_erro <- read_html(tf) html_erro %>% html_node...
asked by 22.11.2016 / 01:41
1
answer

Graph of interaction in ggplot2

I'm trying to adapt some of the standard R graphics to the ggplot2 style. One of the charts I want to do this is the interaction graph in a linear model fit study. The following data were taken from Example 9-1 in Douglas C. Montgomery...
asked by 15.12.2016 / 19:45
1
answer

bRasilLegis - XML content does not seem to be XML

I am trying to lower the votes of the deputies to the propositions in votes in the Plenum of the Chamber of Deputies, in 2015, through the package bRasilLegis no R. But when I put the proposition number in the "number" argument of the function...
asked by 21.03.2016 / 04:33
1
answer

How to show the axes of a histogram with their respective classes in R?

I plots a histogram of the weight variable in my data sheet but it appears without the axes. The code I used was: hist(rehab.1$PESO, main = "", axes = F, xlab = "Peso(kg)", ylab = "frequências absolutas",col = 'green')     
asked by 18.03.2016 / 20:37
1
answer

How to delimit the number of characters written per line in a "txt" output, in the R?

I am writing a filelog and want to print it on an A4 sheet. One of the parts of this filelog has a variable, with the following structure: cod<-c(82024,82042,82067,82098,82106,82113,82141,82145,82178,82181,82184,82188,82191,82198,82212,...
asked by 19.03.2016 / 18:38