Questions tagged as 'r'

1
answer

Use lapply (instead of for) to just leave the common columns of multiple dataframes in a new list

dput of list: structure(list(col1 = structure(list(a = 1:5, b = 1:5, c = 1:5), .Names = c("a", "b", "c"), row.names = c(NA, -5L), class = "data.frame"), col2 = structure(list( a = 6:10, c = 6:10), .Names = c("a", "c"), row.names =...
asked by 07.09.2018 / 23:12
1
answer

Convert char to hour

I need to convert a field from a char file to something that is averagely calculable. This is a field that refers to hours originally. system.time(cpc_call<-fread("ACIONAMENTO_CALL.csv",header = T , sep= ";")) # Importa tabela When I...
asked by 15.12.2017 / 21:25
1
answer

How to handle errors during web scraping?

Hello everyone. During the Web Scraping process, I began to encounter some errors that occur during the requisition process. I have now identified 4 most common types of errors: Error in curl::curl_fetch_memory(url, handle = handle) :...
asked by 17.12.2017 / 17:34
1
answer

Error generating graph with package ggplot2 in R

Hello, I'm looking for help to improve a script in R. I've developed it with the help of the ggplot2 package. I want to show a graph with average and standard error and the points of the data set. For this I used the layers "geom_errorbar ()" an...
asked by 08.08.2018 / 16:09
1
answer

Calculate the variance of values related to a range of the group? No soft R

Example I have the database as follows: MES RESP 1 4.67 1 5.11 2 5.22 2 4.99 3 4.60 3 5.39 4 4.98 4 5.29 5 5.82 5 5.01 6 5.90 6 4.22 7 4.40 7 4.69 How do I calculate the Variance, Mean, Standard Deviation betwee...
asked by 28.07.2018 / 12:07
1
answer

problem with R enconding

I've been asked to do text analysis and am having trouble with encoding, does anyone know how I can translate these strings directly? Example of how the file is appearing: vocês dizerem que não!!! Até quando Another example: â¤ï¸(.....
asked by 08.12.2017 / 16:06
1
answer

R data preparation for cluster use

I have a database, where in the first column are some basketball teams and the following columns are some observed variables. I would like to do a cluster analysis using such packages: library("cluster") ; library("factoextra") ; library("magr...
asked by 21.11.2017 / 15:57
1
answer

With loop use columns in objects in R

Hello, I have created more than 8 thousand dataframes in R. However, when trying to loop in one of the columns of each object, I always have the answers that the function used does not read non-numeric objects. How do I fix this? for(i in 10:13...
asked by 19.04.2018 / 16:37
2
answers

I want to generate a table of R for Latex

I want to generate a table with the summary data of R with the results I got, I know there is a library called stargazer that does, but I did not find the documentation.     
asked by 14.09.2017 / 06:14
1
answer

Inverse transformation in R for continuous var whose max value = Inf

I have the following var continuous: > summary(banco1$rac) Min. 1st Qu. Median Mean 3rd Qu. Max. NA's 0.000 5.077 6.694 17.380 8.728 4917.000 465 This var does not present normal distributio...
asked by 11.09.2017 / 11:24