-
Notifications
You must be signed in to change notification settings - Fork 42
/
dataMergeUtils.R
31 lines (27 loc) · 932 Bytes
/
dataMergeUtils.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Title : Data merge utitlies.
# Objective : Ease the combination of planets positions / aspects and asset price tables.
# Created by: pablocc
# Created on: 26/01/2021
library(data.table)
source("./fileSystemUtilities.R")
source("./dataLoadUtils.R")
#' Merge daily planet longitude position and asset price augmented table.
#' @param symbolID Symbol ID of the asset data to process.
#' @return Daily planets position + asset prices data table.
planetsPositionsAssetPricesDataMerge <- function(symbolID) {
merge(
dailyPlanetPositionLoad(),
assetAugmentedDataLoad(symbolID),
by = 'Date'
)
}
#' Merge moon phases and asset price augmented table.
#' @param symbolID Symbol ID of the asset data to process.
#' @return Daily moon phases + asset prices data table.
moonPhaseAssetPricesDataMerge <- function(symbolID) {
merge(
dailyMoonPhasesLoad(),
assetAugmentedDataLoad(symbolID),
by = 'Date'
)
}