Revisión | f250f238e4adec02ada03b9624a70d8e00021fd6 (tree) |
---|---|
Tiempo | 2024-03-03 19:06:41 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I now save also time-stamped versions of the portfolio compositions as pdf files.
@@ -151,7 +151,8 @@ | ||
151 | 151 | my_time_stamp <- top_recent |> |
152 | 152 | select(timestamp) |> |
153 | 153 | slice(1) |> |
154 | - pull(timestamp) | |
154 | + pull(timestamp) |> | |
155 | + select_left_pattern(".") | |
155 | 156 | |
156 | 157 | |
157 | 158 | top_recent2 <- top_recent |> |
@@ -160,8 +161,11 @@ | ||
160 | 161 | mutate(value2=format_col(asset_value_usdt,1)) |
161 | 162 | |
162 | 163 | |
163 | -title2 <- paste("Portfolio at ", my_time_stamp, sep="" ) |> | |
164 | - select_left_pattern(".") | |
164 | +title2 <- paste("Portfolio at ", my_time_stamp, sep="" ) | |
165 | + | |
166 | +fname2 <- paste("portfolio_now_",my_time_stamp, ".pdf", sep="" ) | |
167 | + | |
168 | + | |
165 | 169 | |
166 | 170 | gpl <- ggplot(top_recent2, aes(y=asset, x=asset_value_usdt## , |
167 | 171 | ## fill=relation_to_median |
@@ -196,10 +200,15 @@ | ||
196 | 200 | ggsave("./history_usdt/portfolio_now.pdf", gpl, width=6,height=8) |
197 | 201 | |
198 | 202 | |
203 | +fsave <- paste("./history_usdt/", fname2, sep="") | |
204 | + | |
205 | +ggsave(fsave, gpl, width=6,height=8) | |
206 | + | |
207 | + | |
199 | 208 | print("The final value of the portfolio in USDT is, ") |
200 | 209 | print(total_portfolio_value_usdt) |
201 | 210 | |
202 | 211 | |
203 | - | |
212 | +system("detox *") | |
204 | 213 | |
205 | 214 | print("So far so good") |