Questions tagged as 'dplyr'

1
answer

Error in View: invalid caption argument [closed]

I was moving the following script: library(tidyverse) library(dplyr) library(readxl) cirurgia <- read_excel("C:/Users/Agnes/Desktop/Coisas com R/R/2_MIOMECTOMIA_HISTERECTOMIA-MAR_SET-2017.xlsx", sheet = "Plan1",...
asked by 01.12.2018 / 23:10
1
answer

Get previous values of a variable if the current value is 0 with a condition using dplyr in R

I have a database as follows: CNPJ data dataquebra alto 2222 201603 201711 s 2222 201511 0 s 2222 201702 201711 s 2222 201704 201711 s 3333 201601 201711 s 3333 201509 0 s...
asked by 11.07.2018 / 16:27
1
answer

Select part of Text in R

I would like to filter specific elements of a row, similar to the Excel filter. I have the following example: NOME VALOR LEITO 1 10 LEITO 2 - HPP 20 LEITO 3 - HPP 30 LEITO 4 40 I need to filter, in the name column, lines with the...
asked by 01.12.2017 / 13:15
1
answer

How to take the variation in relation to the number of days of the difference of dates in the R

I have a table in csv with 5 information, two with dates, two with prices, and one with the difference between dates. I have the date 1 set to a date and the date 2 varies. For example: 10/01/2018 > 11/01/2018 10/01/2018 > 1/12/...
asked by 10.07.2018 / 21:14
1
answer

Clustering in R

I need to cluster this database and then make the prediction .... I would like to know how I could do the substitution correctly in this case? Which type of clustering would fit best? I am a beginner in the data area and I am trying to sol...
asked by 19.10.2017 / 14:25
1
answer

Take a sample without repetition taking into account 2 variables in the R

I have two bases. One with the lines that would like to take the sample and the other with the sample size with the date. The first one that is the actual database that I need to sample, is exemplified below called "good": CNPJ data 333333...
asked by 02.08.2018 / 19:44
0
answers

Problems with dplyr filter ()

Hi, people. Well, I've been trying to replicate a code I made on the work computer in my notebook. At some point, I do data filtering with dplyr using the "<" and ">" signs. When I made the code on my notebook, the...
asked by 05.10.2018 / 15:23
1
answer

How to make two loops for the same code only go varying the columns of the courses and the columns of the questions?

I have a date.frame with many codes in the rows and many columns of questions, I'm making the simple frequency of each question would like to know how to vary the courses and questions at once, without having to manually repeat the code I gene...
asked by 09.06.2018 / 17:14