• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión5d36c5e195f345421efd8bf7ab807bfa420bab74 (tree)
Tiempo2025-01-16 18:23:03
AutorLorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

I improved the treatment of the date field.

Cambiar Resumen

Diferencia incremental

diff -r f446063e069a -r 5d36c5e195f3 R-codes/accountancy_etsy.R
--- a/R-codes/accountancy_etsy.R Wed Jan 15 21:08:14 2025 +0100
+++ b/R-codes/accountancy_etsy.R Thu Jan 16 10:23:03 2025 +0100
@@ -21,6 +21,9 @@
2121 na_num_to_pattern(0)
2222
2323
24+
25+
26+
2427 df_long <- df |>
2528 select(-c(type, currency)) |>
2629 pivot_longer(cols=c(amount, fees_taxes, net), names_to="transaction_type",
@@ -32,7 +35,15 @@
3235 mutate(title2=retain_pattern(title2, "Partial refund for Order")) |>
3336 mutate(title2=retain_pattern(title2, "Listing fee")) |>
3437 mutate(title2=retain_pattern(title2, "Transaction fee")) |>
35- rename("transaction_type_new"="title2")
38+ rename("transaction_type_new"="title2") |>
39+ mutate(day_month_year=dmy(date)) |>
40+ mutate(year=year(day_month_year)) |>
41+ mutate(month=month(day_month_year))
42+
43+
44+
45+
46+
3647
3748 df_tran <- df_long |>
3849 summarise(total=sum(value_eur), .by=transaction_type)