Anyone know how to fix this problem? Literally dying here.
I divide x by some number y and get the output Tmin.
But when I multiply Tmin by y to x again. R tells me that this is not x. However, when I compute the Tmin * y and assign the output by hand. R says that they are equal.
I checked, this is not because of different data types nor because of factors?
Tmin is obtained like this
test = structure(list(datetime = structure(c(1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300, 1621506300, 1621506300, 1621506300, 1621506300,
1621506300, 1621506300), tzone = "UTC", class = c("POSIXct",
"POSIXt")), expire_mins = c(49235, 49235, 49235, 49235, 49235,
49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235,
49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235,
49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235,
49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235,
49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235, 49235,
180275, 180275, 180275, 180275, 180275, 180275, 180275, 180275,
180275, 180275, 180275, 180275, 180275, 180275, 180275, 180275,
180275, 180275, 180275, 180275, 180275, 180275, 49235, 49235,
180275, 180275, 180275, 180275, 180275, 180275, 8915, 8915, 8915,
8915, 8915, 8915, 8915, 8915, 8915, 8915, 8915, 8915, 8915, 8915,
8915, 8915, 8915, 8915, 8915, 8915, 8915, 8915, 180275, 180275,
311315, 311315, 311315, 311315, 311315, 311315, 311315, 311315,
311315, 311315, 311315, 311315, 311315, 311315, 311315, 311315,
311315, 311315, 311315, 311315), absdiff = c(0.54615, 0.4479,
0.3504, 0.25145, 0.15385, 0.055, 0.04345, 0.14125, 0.23985, 0.54615,
0.4479, 0.3504, 0.25145, 0.15385, 0.055, 0.04345, 0.14125, 0.23985,
0.59595, 0.59595, 0.3384, 0.3384, 0.4049, 0.3054, 0.20485, 0.10475,
0.00555, 0.0943, 0.1943, 0.29385, 0.39395, 0.4049, 0.3054, 0.20485,
0.10475, 0.00555, 0.0943, 0.1943, 0.29385, 0.39395, 0.49335,
0.49335, 0.50365, 0.50365, 0.5933, 0.5933, 0.69315, 0.69315,
0.7936, 0.7936, 0.09445, 0.00419999999999998, 0.1033, 0.20315,
0.30265, 0.4015, 0.50065, 0.5989, 0.6977, 0.09445, 0.00419999999999998,
0.1033, 0.20315, 0.30265, 0.4015, 0.50065, 0.5989, 0.6977, 0.19435,
0.19435, 0.79695, 0.79695, 0.8938, 0.8938, 0.89555, 0.89555,
0.2928, 0.2928, 0.39175, 0.39175, 0.40115, 0.3015, 0.2017, 0.102,
0.00219999999999999, 0.09815, 0.1982, 0.2983, 0.3983, 0.40115,
0.3015, 0.2017, 0.102, 0.00219999999999999, 0.09815, 0.1982,
0.2983, 0.3983, 0.49815, 0.49815, 0.501, 0.501, 0.4912, 0.4912,
0.3695, 0.2717, 0.17305, 0.0744, 0.02405, 0.1227, 0.22075, 0.31945,
0.41775, 0.3695, 0.2717, 0.17305, 0.0744, 0.02405, 0.1227, 0.22075,
0.31945, 0.41775, 0.46775, 0.46775)), row.names = c(NA, -124L
), class = c("tbl_df", "tbl", "data.frame"))
N365 = 60*24*365
day8min = 60*24*7
Tfa = unique(test$expire_mins) %>% sort(decreasing = FALSE)
Tfa = Tfa[Tfa > day8min] %>% head(2)
Tmin = Tfa/N365
nx = test %>% subset(test$expire_mins == (Tmin[2] * N365))
# nx returned is of 0 obs and 9 variables