Skip to content

Instantly share code, notes, and snippets.

View tanho63's full-sized avatar
๐Ÿˆ

Tan Ho tanho63

๐Ÿˆ
View GitHub Profile
@tanho63
tanho63 / update_tm_xgb.R
Created December 9, 2025 01:54
updating tidymodel-xgboost for newest version
# install new xgb library to main install loc
pak::pkg_install("xgboost")
# install old xgb library to temporary location
old_xgb_lib <- "~/temp_xgb_lib"
pak::pkg_install("cran/[email protected]", lib = old_xgb_lib, dependencies = FALSE)
update_xgb <- function(local_file, old_xgb_lib = "~/temp_xgb_lib") {
# unload any loaded version of xgboost
unloadNamespace("xgboost")
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print(pi)
#> [1] 3.141593
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
``` r
print("pie")
#> [1] "pie"
```
<sup>Created on 2025-09-19 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup>
@tanho63
tanho63 / ggplot-data-pronoun-shiny.R
Created February 28, 2025 16:19
ggplot .data pronoun shiny
library(shiny)
library(ggplot2)
ui <- fluidPage(
selectInput("var", choices = names(mtcars),label = "choose column"),
br(),
plotOutput("plot")
)
server <- function(input, output, session) {
output$plot <- renderPlot({