Questions tagged as 'r'

1
answer

R: how to transform only the year (four digit) into a date frame?

I have a date frame with the column below. I would like to turn the years (with 4 digits) into dates (as.Date). The idea would be to keep only the same years. I tried some solutions that I saw there, but I still have not been able to. I'm a begi...
asked by 16.01.2018 / 11:17
1
answer

Turning the database into R - A kind of PivotTable

I have a database as follows: CNPJ SIGLA chave CENTRAL 3333 CREDSUL CACHOEIRODIM-ES CECOOPES 4444 COOPSEFES VITORIA-ES CECOOPES 55555 CREDI VITORIA-ES CECOOPES 66666 CREDEXTRA SERRA-ES...
asked by 08.01.2018 / 13:45
1
answer

In R: how to group the results of a loop in an rbind function?

Since I have a dataframe called page whose number of rows changes regularly, I wrote this code so that it fits the number of rows that my page$id has and I wrote this while so that it will generate a "g_com[numero]" fo...
asked by 09.05.2017 / 07:03
2
answers

Join two data.frames in one

I have a routine that the goal will always be the same; Every day it should read a xlsx file with all prices (historical series), pull a given site from the prices referring to the last update date, merge these two data into a single data...
asked by 11.04.2017 / 22:58
1
answer

Compare rows of matrices with different dimensions and return a single logical vector

I have two coordinate arrays, the A matrix with 83213 rows and two columns (longitude, latitude) and the B matrix with 46886 rows and two columns (longitude, latitude). I would like to compare the coordinates of these two arrays and return a log...
asked by 09.04.2017 / 22:52
1
answer

How to transform my data.frame in a time series?

My date frame is this: IPCA.X04.05.2017 IPCA.Beta.1 IPCA.Beta.2 IPCA.Beta.3 IPCA.Beta.4 IPCA.Lambda.1 IPCA.Lambda.2 2 IPCA 0,0526 0,0442 -0,1269 0,0524 1,3477 0,7203 My goal is to create a large da...
asked by 05.05.2017 / 22:36
1
answer

Cloud of words Shiny R

I'm wanting to make a word cloud using data from a postgresql table. I used an example as the base I found on the Shiny R website, but I can not do what I want. I can not change which variable will serve as the basis of the word cloud. I need...
asked by 17.11.2016 / 01:43
0
answers

Sort Data in R [closed]

I have a dataset: MATRICULA <- c(111,222,444,1010,1020,777,888,999,555,666,333) VALOR <- c(1000,2000,4000,10000,11000,7000,8000,9000,5000,6000,3000) DADOS <- data.frame(MATRICULA, VALOR) How to perform separately on the r tag the...
asked by 28.12.2018 / 14:14
0
answers

Emojis do not appear when executing the emo :: ji () function in R

I can not see the emoji of the package emo of R when generating a file in rmarkdown. I do this: emo::ji("smile") Nothing appears and reports no error. In this other way: tibble::tibble(emo::ji("smile")) Output is ou...
asked by 17.12.2018 / 21:38
1
answer

Split base with "for" in R

As my first for in R I found it difficult to apply this function. I have a base that has a base date with different years and I would like to split the base by base dates. The variable "date" has a split date from January 1995 (199501) until...
asked by 29.06.2017 / 22:53