Questions tagged as 'r'

1
answer

How to swap an apply within a for by a double apply?

I have a origem vector and a destino vector with several locations in latitude and longitude. For each location in origem , I want to count how many places in destino are located within a radius of up to 2km, so I d...
asked by 18.01.2017 / 01:16
2
answers

Second degree polynomial regression in R: How to get X given Y?

R Gurus, I have the following data frame (Df) that establishes the relationship between the X and Y variables: X Y 1 25 2457524 2 25 2391693 3 25 2450828 4 25 2391252 5 25 2444638 6 25 2360293 7 50 4693194 8...
asked by 17.11.2016 / 20:36
1
answer

I can not install the stringi package in CentOS

I'm trying to install the package stringi on a cluster that runs CentOS 7, but I'm failing miserably. The error that occurs is below: ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unab...
asked by 07.12.2016 / 01:22
1
answer

include missing data

Good afternoon, I have the following problem. I need to join two sets of data that have 2 variables in common, "uor" and "month". Only 1 variable does not have values for a given month. And what I wanted was that for the months that do not ha...
asked by 06.12.2016 / 20:09
1
answer

Insert graphics automatically into github pages

When creating a .md file for the _post folder of github pages with rstudio, the graphics generated with the R commands should be inserted one by one via the command: ![center](/nome_pasta_imagens_dentro_da_master/nome_da_figura.png) Or is t...
asked by 08.09.2016 / 00:29
1
answer

Impulse-Response Function in R

I'm having a question regarding the output of the irf function of the vars package. What is the difference in relation to the output for arguments _cumulative = TRUE/FALSE_ and _ortho = TRUE/ FALSE_ ? Another t...
asked by 08.07.2016 / 10:48
2
answers

loop in correlation matrix in R

I have tried to learn about loops and functions in R. So I set myself to the following situation: I have a pairwise correlation matrix: dados<-matrix(rnorm(100),5,5) colnames(dados)<-c('A','B','C','D','E') rownames(dados)<-c('A','B','...
asked by 06.03.2016 / 16:59
2
answers

Compare contents of a Column

I'm a beginner in R and needed help comparing column contents. First I ordered my table based on a specific column. For this I used the following function: x = fread ("x.txt",sep=";") x_ordenado = x[order(x$V3),] I'm working with files...
asked by 20.05.2015 / 22:26
0
answers

Pseudo prediction (Rolling)

How to make pseudo predictions out of the sample, through rolling regressions and with moving window containing 50 observations, for t = 51 to 100? One of the forecasts should be made from an AR (1). Another will be made from a random walk, that...
asked by 12.05.2016 / 03:26
1
answer

Show information from a dataframe on a shapefile map

I have a .dta table that I have already imported for R. One of the columns in this file is called "mun" and it has the municipalities code for Brazil, a 7 digit number. Idownloadedthe Shapefile from the IBGE website strong> which comes with...
asked by 16.12.2016 / 14:58