Description Usage Arguments Details Value See Also Examples
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.
1 2 | ## S3 method for class 'Transactions'
Duplicated(x)
|
x |
|
Unique dates are read from new transactions in
object x
.
Select of transactions with same dates from database.
Comparison of new with selected transactions (columns: payor_id, payee_id, date, reference, entry, value, currency)
Identical rows are noted and then
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
Transactions
object, a list of 4 elements:
Transactions a data.frame of the file that was read
Reference a data.frame of the reference account
db character of database used
Prediction a data.frame of transactions as they should be entered into the database
Duplicated a data.frame of length nrow
Transactions with columns
bool and type. bool says for every row in
Transactions whether is exists in the database already.
If so, type says what type this already existing row
(in the database) has.
Other procedures: Duplicated
,
Enter.Transactions
, Enter
,
Evaluate_Predictor
,
Predict.Transactions
,
Predict
, Read.Transactions
,
Read_csv
, Read
,
Update_Predictor
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.