Questions tagged as 'r'

1
answer

How do I access a position in a vector of characters?

The following code returns a vector of 12 letters: > res <- "ACDEDEAEDCED" > res <- strsplit(res,"", FALSE) > View(res[4]) Error in .subset2(x, i, exact = exact) : índice fora de limites More when I try to access a position a...
asked by 07.03.2016 / 00:07
1
answer

How to get the first nonzero element?

I have the following problem, I have an array and I want to go through it and get the first line that has all elements other than zero. For example: a = matrix(c(rep(0,4), 1:16), ncol = 4, byrow = T) b = matrix(c(1:4, rep(0,4), 5:16), ncol = 4...
asked by 28.09.2015 / 16:21
2
answers

ASCII reading files of the Demographic Census 2010

Does anyone know where to download the ASCII (.sas) files for reading the microdata of the 2010 IBGE Demographic Census? I know the Anthony Damico just keeps some files on his site (see below how to do the download), but I am looking for th...
asked by 28.09.2015 / 17:20
1
answer

How to change x-axis values (not the axis title) in the "seasonplot"?

In the seasonplot function of the forecast package, how do I change the names of the "x" axis? I used the "xlab" argument, but it just names the axis, I need to change the axis scales. Ex: There are days of the week in Engli...
asked by 22.01.2015 / 19:33
1
answer

Size of a predefined interval within a vector

I would like to know how I can calculate the amount of elements I have in a predefined range, within a vector. For example: Let's say I have a vector of size 10. My intention for example is to want to know how many elements have between the s...
asked by 26.12.2014 / 02:22
1
answer

Data.frame for ts daily data in R

I can not turn the daily exchange rate to ts. dados <- read.table("C:/Econometria/Cambio/cambio.txt", header=T, dec=",") ts(dados), start=c(1994,01,01), freq=1) # Quando faço isso ele muda os dados, acaba aparecendo valores que não estão no...
asked by 18.12.2014 / 13:03
1
answer

Test of mean difference hypotheses in the R survey package

Please, using the Survey package, how do you test the mean difference hypotheses? i.e. if the sample mean of 2003 is the same in 2008 for a certain variable. I'm working with PNAD data     
asked by 30.10.2014 / 16:32
1
answer

How to do scrapping on Google Scholar?

Using Mozilla Firefox, could anyone tell you how to do scrapping on Google Scholar? Where to start?     
asked by 27.10.2014 / 14:11
1
answer

What are the advantages of working directly with stdin, stdout and stderr?

Is there any advantage in terms of speed or some other aspect? Show connections: showConnections(all = TRUE) Individual examples: stdin() stdout() stderr()     
asked by 22.09.2014 / 17:02
1
answer

How to download multiple urls in R?

I need to extract several text files that are organized into annual folders in the following url: link How do I extract multiple folders at the same time? For example, if I want the 2003, 2004, and 2005 files, so I do not need to write the...
asked by 29.05.2014 / 02:01