Duplicated.Transactions: Duplicated.Transactions

Description Usage Arguments Details Value See Also Examples

View source: R/Duplicated.R

Description

This function uses a Transactions object as created with Predict.Transactions and compares it with the database transactions. Whether some transactions already exist in the database is returned in form of a dataframe.

Usage

1
2
## S3 method for class 'Transactions'
Duplicated(x)

Arguments

x

Transactions object (created with Predict.Transactions)

Details

  1. Unique dates are read from new transactions in object x.

  2. Select of transactions with same dates from database.

  3. Comparison of new with selected transactions (columns: payor_id, payee_id, date, reference, entry, value, currency)

  4. Identical rows are noted and then

  5. Returned in form of a data.frame with nrow new transactions and two columns bool and type. Bool says whether same row in transactions (in x) was found in the database, type says what the

Value

Transactions object, a list of 4 elements:

See Also

Other procedures: Duplicated, Enter.Transactions, Enter, Evaluate_Predictor, Predict.Transactions, Predict, Read.Transactions, Read_csv, Read, Update_Predictor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
db <- "test.db"
Create_testDB(db)

params <- list(
  nFeats = 200, 
  DDL = FALSE, 
  time = list(start = as.Date("2010-1-1"), end = as.Date("2011-1-1"))
)
InsertBLOB("Params", params, db)
Update_Predictor(db)

f <- system.file("extdata", "test_transactions.csv", package = "abacus")
cols <- list(name = 6, iban = 7, bic = 8, date = 3, 
             reference = 5, entry = 4, value = 9, currency = 10)
tas <- Read_csv("giro", f, cols, db)
tas <- Read(tas)
tas$NewAccounts$owner[3] <- "New Owner 3"
tas <- Predict(tas)

tas <- Duplicated(tas)
m <- cbind(tas$Prediction,tas$Duplicated)
names(m)[15:16] <- c("exists in db", "with type")
DT::datatable(m)

mRcSchwering/abacus documentation built on May 21, 2019, 9:18 a.m.