Questions tagged as 'r'

0
answers

Install patch pro R

As documented here , the R iconv function does not work satisfactorily. Fortunately, a patch has been developed that addresses the problem (apparently). My question is basic: how do I install the patch? In the SO in English , there is an...
asked by 20.07.2016 / 23:06
1
answer

Error: In Ops.factor

I'm working with a data.frame of weather data and want to know if the data is within the reading limits of the equipment. For this, the tolerance limits adopted for temperature (% with%,% with% and% with%) are -40 ° C to +60 ° C. In a new column...
asked by 07.10.2018 / 00:51
0
answers

R - download CVM data via POST method (package httr) (new - continues)

Good evening, guys !! I would like to have asked this question there in this post, which I refer to in the title, but it was not possible. What happens is the following: I am using, for the same purpose, the resolution of our dear friend Tpic...
asked by 17.10.2018 / 21:16
3
answers

R: How to count and sum the amount of a given "factor" in the observations (rows) of a data.frame?

Expensive, I would like to get the amount of "yes" (factor) in each row of a data.frame, like the one below. Would anyone know what arguments I would have to use to do this with the "mutate"? I tried it in different ways and I could not. I tried...
asked by 22.03.2018 / 22:20
3
answers

How do I filter data according to part of the characters of a variable?

How can I, for example, list only the comments contained in the Name variable, the word Silva? Nome Nota João Silva 9 Pedro Souza 8 Ana Silva 6 Isabela Cabral 10 Paulo Santos 5 I would l...
asked by 21.07.2017 / 01:49
1
answer

How to import .dat file into R

I downloaded a .dat file that is basically an array with data. However, it seems to me that the only way to work with it is by doing the following command (I am using R and I do not have much experience with R): setwd("C:") load("dat...
asked by 04.04.2017 / 04:58
0
answers

I can not reproduce PNAD 2013 government data from microdata [closed]

The government announced last year the result of the 2013 PNAD, it appears that there is # I downloaded the PNAD microdata and with the R attempt to reproduce the analysis below the code: setwd( "/saneamento_basico/") # pacotes # --------...
asked by 25.09.2015 / 20:28
2
answers

Withdraw NA in a Data Frame

I import a file containing more than 30 columns. Some blank lines that I imported the R recognize as "NA". When exporting these same columns, the lines that should be blank (empty) appear with "NA". How do I export by changing the "NA" for empty...
asked by 14.08.2018 / 17:10
2
answers

Execute command for each column of a data.frame

Hello, I have a data.frame (df) 8 rows x 8 columns. I'm calling the columns of "ST [i]". df <- structure(list(ST1 = c(58.69, 58.5, 58.5, 58.69, 58.69, 58.5, 58.69, 58.69), ST2 = c(68.7, 68.42, 68.42, 68.7, 68.7, 68.42, 68.7, 68.7), ST3...
asked by 07.11.2017 / 15:23
2
answers

Create a vector with the Levels of a factor in r

I have a column in my data array as follows: > as.factor(matriz$especime) [1] 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 [29] 3 3 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 7...
asked by 25.04.2018 / 23:05