Questions tagged as 'r'

2
answers

blocks of 15 days in sql in R

I have the following table:          id money date one fifteen 2009-02-07 one 30 2009-02-09 one Four. Five 2009-03-04 one fifty 2009-03-12 I would like to get the most money spent in every fortnight. For example, for the...
asked by 17.04.2017 / 15:38
2
answers

Read table of a url with R

I have problems with the read.table function. I want to read a table from an url, and save it in R as a dataframe. The url is: link I wrote this code: library(RCurl) a <- getURL('https://datanalytics.com/uploads/datos_treemap.txt') b...
asked by 09.11.2017 / 15:33
1
answer

How to rotate a table name left margin with knitr and xtable?

I'm trying to get a pdf with the results of the table command applied to two vectors. For this I use knitr and the xtable package, although other solutions and advice are welcome, such as with Kable. As an example we can create the table f...
asked by 29.03.2017 / 17:51
1
answer

R, can not allocate vector of size 1123.5 Gb

I have a consumption matrix with half a million observations and 187 variables when I run fviz_nbclust(data, kmeans, method = "wss") + geom_vline(xintercept = 4, linetype = 2)+ labs(subtitle = "Elbow method")' gives me the following er...
asked by 18.12.2018 / 21:03
1
answer

Error entering RStudio, r or to the application

Install the packrat package to manage the versions of my libraries but when I pass it to the computer where I have the applications it does not work and I get an error where I look for the file packrat/init.R , everything fails and when en...
asked by 18.03.2016 / 18:59
1
answer

How to assign specific colors in ggplot R

I am working with a database and I want to make a barplot in which each column is related to a variable, and I want to assign each column a specific color, and not the one chosen by default by ggplot. These are the data I have: Abstenci...
asked by 07.06.2016 / 11:53
2
answers

Any alternatives to the ifelse?

I am facing a problem that I do not know how to solve. I have 2 (very large) dataframes of DIFFERENT dimensions that contain meteorological station information on a daily basis for 15 years. The problem I have is that the same station has a diff...
asked by 04.09.2018 / 10:51
1
answer

Problem plotting with plotGoogleMaps

Hi, I'm new, graphing in R and I have the following problem. I have some sample points in an XLSX file. Latitud Longitud Altura 19°10'40.11"N 97°38'15.45"O 2362 19°10'37.85"N 97°38'28.32"O 2361 19°10'36.21"N 97°38'2...
asked by 17.04.2018 / 00:29
1
answer

R: Error in bind_rows_ (x, .id), Argument 111 when combining dataframes

I am using R version 3.4.3. I have two data.frames of different sizes with some common columns and others not. I want to combine both data frames keeping the different columns so that NAs appear in the part of the data frame where that column wa...
asked by 04.04.2018 / 10:53
1
answer

Delete all points with gsub

I want to know how to correct the code to delete a character (period) in an identity number variable (eg: "2.564.752" convert to "2564752" ). Instead of deleting just that character, it ends up deleting all my variable, would you...
asked by 01.02.2018 / 15:00