Closed R-CoderDotCom closed 4 years ago
This issue is still there. For the monthly calendar heatmap, If there is any value greater than no of days of that month in data, then it gives an error message as
"No element of the 'special.days' vector can be greater than the number of days of the corresponding month or year"
@PiyushDahal This is because calendR restricts the values to be smaller than 365. The solution is to normalize the input:
# scale data for year calendar
scale_data <- function(x) {
365* ((x - min(x)) / (max(x) - min(x)))
}
For a month you will have to change the constant 365.
Solved