Questions tagged as 'data.frame'

1
answer

How to calculate the difference between two dates of a column and group by category to generate a new Database in software R

Following the example of the original database and the new database:     
asked by 29.04.2018 / 16:13
1
answer

How to create a data frame from a database based on the difference of two dates in a column of another categorical variable in software R

I have the following database as an example and the result I expect: In case the values in the new dataframe refer to the days, which is the difference of the last date of a category from the first of the same category.     
asked by 17.04.2018 / 00:11
1
answer

Create a sequence of useful days in R

I have a data frame the following columns: Date (Days of the week only, no holidays, over several years) Month Year ... I want to create a workday sequence. So I wanted a function that read the smallest day of the first month and the largest...
asked by 09.05.2017 / 00:20
1
answer

add different data frames based on column names

I really need your help to complete an analysis. I have the following tables (data frames): df1<-data.frame(c(0,1,1,0),c(1,0,0,1),c(1,1,0,0)) colnames(df1)<-c("0","0.5","1") df2<-data.frame(c(1,1,1,0),c(0,1,0,0)) colnames(df2)<-c("...
asked by 26.12.2017 / 19: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

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
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
1
answer

Find all the different elements of a column (pandas)

I developed this part with the functions learned in the classroom #importando pandas import pandas as pd #criando o dataframe base = pd.read_csv('C:\Users\lsilv\Desktop\acessos.csv') #renomeei as colunas para ficar mais fácil de usar base.colu...
asked by 30.11.2018 / 16:29
0
answers

How do I insert rows into specific places in a data frame?

I need to insert rows in the "fev" column on days 30 and 31 that are filled with "NA" so that the data in the rows is shifted down. I tried fev$novaLin <- with(fev, as.integer(d == 30, 31 & fev == NA, NA)) , but it did not work bec...
asked by 02.04.2018 / 15:36
0
answers

Plot data in a group where the groups are in another data.frame

I have this data.frame date pol S01P01 S01P02 S01P03 S01P04 S01P05 S01P06 1 2016-01-23 vh -11.89972 -10.32407 -11.56241 -11.54153 -11.76252 -12.49887 2 2016-10-01 vh -11.98468 -10.65089 -12.51395 -11.72623 -13....
asked by 23.11.2017 / 16:06