Posts by Fernando Vieira • 71 points
4 posts
-
1
votes0
answers58
viewsQ: Loop entire script -- more than one R variable
I have a script with five variables. Suppose the variables and their data types/classes are the following: var1(date) var2(date) var3(date) var4(date) var5(Numeric) I would like to import a…
rasked Fernando Vieira 71 -
4
votes1
answer44
viewsA: If_else and Filter
Follows the resolution found: indices <- if (day(NomDataIn) != 1) { filter(indicesBrutos, Mes >= NomDataIn-30, Mes <= CMData) } else { filter(indicesBrutos, Mes >= NomDataIn, Mes <=…
-
1
votes1
answer44
viewsQ: If_else and Filter
I’m trying to give a filter: library(tidyverse) library(lubridate) filter(indicesBrutos, if_else(day(NomDataIn) != 1, filter(Mes >= NomDataIn-30, Mes <= CMData)), filter(Mes >= NomDataIn,…
-
0
votes1
answer105
viewsQ: Filter columns conditionally to another column
I would like to select a single value in the dataframe below, according to the following parameters: 1) The values in column nJRS would be the reference; 2) The value of the column nJRS should…