Questions tagged as 'r'

3
answers

How to avoid encoding problems when taking data with TwitteR?

I'm getting Twitter data with the twitteR package for r but the tweets are coming with encoding problem. Does anyone know how to work around this problem? library(twitteR) library(stringr) library(ROAuth) library(RCurl) options(RCu...
asked by 21.02.2014 / 03:06
1
answer

Words superimposed on the software graph R

Hello, I made a chart in the R, but the words were overlapping, I would like help to sort this out. Follow the graph to see how it looks. Thanks.     
asked by 14.04.2016 / 13:49
1
answer

How to use dplyr within a function?

Let's say I wanted to create a function that internally uses some functions of the dplyr or any tidyverse that use this type of syntax. By way of illustration: exemplo <- function(df, predicado, sumario) { df %>% filter(predicad...
asked by 29.06.2018 / 16:40
1
answer

How to save the values of all iterations in R

Hello, I am making a code in R to calculate the various values of a Fuzzy code (using the "Sets" package). I made the logic for it to calculate three Fuzzy variables from smallest to largest, but when I use logic to save these values, it j...
asked by 16.11.2017 / 21:22
1
answer

How to import multiple excel tabs at the same time?

I'm trying to reproduce the code below, but to no avail. What should I put in the path argument? Is it the same in all of them? Some clearer example so I can understand? Any tips on how to import multiple excel sheets at the same time? Thanks!...
asked by 12.12.2017 / 20:22
2
answers

Merge two series (zoo) of the same variable by intersecting and filling

I have two zoo series like this: a: data valor 01-02-2010 2 01-03-2010 0 01-04-2010 9 b: data valor 01-06-2010 3 01-07-2010 6 01-08-2010 2 I want a set c like this: c: data valor 01-02-2010 2...
asked by 15.06.2017 / 06:01
1
answer

Select df data according to data from a list

Expensive as shown below: nr <- c(100:199) dt <- rep("data",100) x <- data.frame(nr,dt) y <- c(110:115) I need to get, with the common numbers between the first column of the data.frame x and the list and match <- x[x[1] =...
asked by 24.05.2017 / 20:38
1
answer

Predict function in GLMM

Edited When we use a traditional logistic regression and make a prediction in R for example: library(dplyr) n = 300 xx<-c("r1","r2","r3","r4","r5") xxx<-c("e1","e2","e3") p=0.3 df1 <- data_frame( xx1 = runif(n, min = 0, max = 10)...
asked by 26.01.2018 / 12:17
1
answer

Reading of pdf via R

I need to convert the PDF data below into a data frame: link Doing a search for the How to Read PDF Data in the R . I had some problems installing the package, but I managed to make it work in RStudio after all. But the result was not sati...
asked by 19.03.2018 / 19:24
1
answer

Make an array of sources and destinations

I need to populate a table with origins and destinations so that each cell contains the total number of people leaving from one location to another. The database has an id for each observation, as well as the source and destination. Each obse...
asked by 22.01.2018 / 06:24