Questions tagged as 'r'

2
answers

Function processing time

How do I check the processing time of the subfunctions of a function in order to optimize it? I read about the topic in the R help and at: link But it does not show the subfunctions of my function, however it shows many functions that I'...
asked by 29.04.2016 / 11:10
1
answer

R - Map of Brazilian cities

Good morning, I'm trying to create a Brazilian map that shows how many cooperatives are present in each city. I have a table with the municipalities IBGE code and the amount of coop. I took shapefile from the IBGE website: link...
asked by 25.09.2018 / 15:11
1
answer

bar graph ggplot 2 side-by-side vectors

Can anyone tell me if it's possible to make this chart with the bars side by side without using data frames or "melt"? v1=c(100,120,140) v2=c(125, 102,104) a=data.frame(year=factor(2003:2005)) ggplot(data=a, aes(x=year)) + geom_bar(aes(y =...
asked by 31.10.2018 / 20:19
1
answer

Problem using ggplot by group

This is my dataframe: structure(list(ind = structure(c(177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L, 177L,...
asked by 16.09.2018 / 05:25
2
answers

How to add space in boxplot and center the median

I would like to make two changes to the following chart :Leaveasmallspacebetweenthegreen(F)boxplotandorange(s)Placethemedianpointinthecenterofeachboxplot(pointsareappearingattheendoftheboxplotandwhenthetwoplotshavethesamemedianvalue,onlyonep...
asked by 29.05.2018 / 17:39
1
answer

How to do the webscrapping of a site that has method post?

I'm having trouble doing webscrapping for sites that use the post method, for example, I need to extract all news related to political parties from the site: link . Below is a schedule I made of a journal that uses the get...
asked by 31.05.2016 / 18:18
2
answers

How to transform a string in Date format into R?

In the code below the dates are in the format: Month Day Year. I need R to recognize the variable as date. #importa os dados library(XML) u<-"http://espnfc.com/team/fixtures/_/id/205/season/2012/brazil?cc=3888" tab<-readHTMLTable(u,heade...
asked by 06.03.2014 / 02:13
1
answer

Why is the last forecast of the time series with the neuralnet package too dissimilar to the rest of the predictions?

I adjusted a neural network to forecast seasonal precipitation from the observed series. When I do validation with observed data, the results are good. But in the series predicted by the model, the last forecast is always with values much below...
asked by 20.11.2017 / 14:56
2
answers

How to change the name of a column

I have a date.frame, I changed the data class of the date column, and then I separated the other three column through the Separate command whose names were% Y,% me% d, I would like to change these names to year, month it is day. However, when tr...
asked by 05.05.2016 / 03:32
2
answers

Time series autocorrelation

Consider the stochastic process AR (1). Generate a sequence of random variables 500 and assuming c = 3 and phi = {0.5, 0.95, 1}. Make autocorrelation from 1st to 3rd order (CR). How to generate these correlations in R? T=500 e=rnorm(T) phi1=.5...
asked by 31.03.2016 / 18:59