Questions tagged as 'r'

3
answers

I want to count the number of times a data appears in a column in R

I have a variable in a data frame that has 2 million rows and around 50,000 different values, I want to know the amount of NULL that exist in this column, I used table (data $ variable) the problem is that being 50,000 different values shows me...
asked by 29.10.2018 / 18:17
1
answer

R Rstudio problems installing the mapdeck package and googlePolylines

When I try to install the mapdeck package in Rstudio, it tells me that I need the googlePolylines package, but I can not install the latter. The error that comes up is the following:    package 'googlePolylines' successfully unpacked and MD5...
asked by 20.11.2018 / 09:21
1
answer

error with apply function

I had the following problem: I have a matrix with several columns and I want to count the cells that are not na of the last 6 cells of each column (0 being the smallest possible number and 6 the largest). To solve it, put the following fun...
asked by 03.10.2018 / 17:02
1
answer

Problem to convert from factor to date in a Data Frame in R?

Every time I try to convert a factor to a date in a DataFrame (data) it returns "NA" in the factor values, in the example I show str (data) it returns that the DATE field is a factor. data$DATE <- as.Date(data$DATE,format="%Y/%m/%d %H") DA...
asked by 25.09.2018 / 22:06
1
answer

R version 3.5.1; package: readr; read_csv (); Windows 7 Ultimate (Servi Pack 1); missing space to execute command

   R version 3.5.1; package: readr; read_csv (); Windows 7 Ultimate (Servi Pack 1); lack space to execute command 2.95 GB of RAM; 33 GB of Hard Disk space. Function to read 9,060,698 Rows of a CSV file, the .zip file weighs 65 MB and the...
asked by 09.11.2018 / 03:15
1
answer

Names of rows in an array in R

I have an array that looks like this: LH_CV 0.044919900 LH_IQ 0.457549906 LH_Kur 0.007265657 LH_Max 0.572179944 LH_Mean 0.592315043 LH_Min -0.053051707 LH_Mode 0.352844542 LH_P01 0.107923404 LH_P05 0.292272397 LH_P10 0.35697...
asked by 03.07.2018 / 12:11
1
answer

Problem to change values in a column in dataFrame in R

I will start from the beginning I have a function that performs the following get a string and return a part of the string x <- "LABEL=UCI-1, CellIndex=50, CGI=368010016000" and my function: value <-substr(x,7,stop=gregexpr(',',x)[[...
asked by 21.06.2018 / 18:30
1
answer

Dates and export table

The first problem: I have an input data file that contains dates in ddmmyy format, on which I must operate, and when I import it in R it recognizes it as a factor. What I have done is to convert it to a character using as.character...
asked by 12.07.2018 / 16:28
1
answer

Delete rows with duplicate id in R

I have data like the following: data<-data.frame(id=c(1,1,3,4),n=c("x","y","e","w")) data id n 1 1 x 2 1 y 3 3 e 4 4 w I want to get an output like the following: data id n 1 1 x 3 3 e 4 4 w that is to say to have unique...
asked by 09.05.2018 / 18:48
1
answer

Delete rows that contain values greater than the previous rows

I have a massive csv file that responds to the following minimized structure: Data Here the data table inserted: Ronda Tratamiento 5 A 6 A 7 A 6 A 7 A 3 B 4 B 5 B 6 B 7...
asked by 22.07.2018 / 17:05