### Install Documentation Dependencies Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bs5/README.md Run this command to install the Node.js dependencies required for building the Bootstrap documentation site, including Astro. ```bash npm install ``` -------------------------------- ### Install bslib Package Source: https://github.com/rstudio/bslib/blob/main/README.md Install the bslib package from CRAN. This is the first step to using the package's functionalities. ```r install.packages("bslib") ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bs5/README.md Run this command from the root `/bootstrap` directory to start a local server for viewing the Bootstrap documentation. ```bash npm run docs-serve ``` -------------------------------- ### Install HTML Dependencies Source: https://github.com/rstudio/bslib/blob/main/tools/README.md Use this script to install or upgrade the HTML dependencies that are bundled with the bslib package. This is typically done using yarn. ```shell Rscript tools/yarn_install.R ``` -------------------------------- ### Basic Colorpicker with Bootstrap Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bs-colorpicker/README.md Instantiate the colorpicker on an input element. This example also shows how to listen for color changes and update a background color. ```html

Bootstrap Colorpicker Demo (with Bootstrap)

``` -------------------------------- ### Install and Load Shiny Package Source: https://github.com/rstudio/bslib/blob/main/inst/examples-shiny/code-editor/examples/markdown.md Use this code to install the Shiny package from CRAN and then load it into your R session. ```r install.packages("shiny") library(shiny) ``` -------------------------------- ### Install Package Dependencies Source: https://github.com/rstudio/bslib/blob/main/AGENTS.md Installs development dependencies for the R package using the 'pak' package manager. Ensure 'pak' is installed before running. ```r # Install package dependencies pak::local_install_dev_deps() ``` -------------------------------- ### Example React App with Bootswatch Theme Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bsw5/README.md Demonstrates importing a specific Bootswatch theme ('slate') into a React application's App.js file. This should be done before other CSS imports. ```javascript import React from 'react'; import logo from './logo.svg'; import 'bootswatch/dist/slate/bootstrap.min.css'; // Added this :boom: import './App.css'; function App() { ... ``` -------------------------------- ### layout_columns() with col_widths Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/layout.md Demonstrates the usage of `layout_columns()` with the `col_widths` argument to define column widths. It shows examples with a single width, multiple widths, and breakpoint-specific widths. ```APIDOC ## layout_columns() with col_widths ### Description This function creates a responsive column layout. The `col_widths` argument controls the width of columns at different screen sizes. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```r # Single column width layout_columns(col_widths = 6, !!!children) # Multiple column widths layout_columns(col_widths = c(4, 8), !!!children) # Breakpoint-specific widths layout_columns(col_widths = breakpoints(sm = 6, md = 4, lg = 3), !!!children) layout_columns(col_widths = breakpoints(sm = NA, lg = c(4, 8)), !!!children) layout_columns(col_widths = breakpoints(sm = NA, lg = c(4, -4, 4)), !!!children) ``` ### Response #### Success Response (200) HTML output representing the layout structure. #### Response Example ```html
``` ``` -------------------------------- ### Error: Both `preset` and `bootswatch` provided Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/bs-theme-preset.md When calling resolve_bs_preset(), only one of `preset` or `bootswatch` can be provided. This example shows the error when both are supplied. ```R resolve_bs_preset(preset = "name", bootswatch = "bootswatch") ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/rstudio/bslib/blob/main/AGENTS.md Installs Node.js dependencies required for TypeScript development using Yarn. This command should be run in the project's root directory. ```bash # For TypeScript development # (Requires Node.js 14+ and Yarn 1.22+) yarn install ``` -------------------------------- ### Installation Failure for kuzco Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Shows an installation error for the 'kuzco' R package, indicating that the package could not be installed. The error message points to a separate log file for details. ```markdown # kuzco (0.1.0) * GitHub: * Email: * GitHub mirror: Run `revdepcheck::revdep_details(, "kuzco")` for more info ## In both * checking whether package ‘kuzco’ can be installed ... ERROR ``` Installation failed. See ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/kuzco/new/kuzco.Rcheck/00install.out’ for details. ``` ## Installation ``` -------------------------------- ### R Package Installation Failure: General Error Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md This indicates a general failure during the installation process of an R package. The specific details of the error are typically logged in a file like '00install.out' for further investigation. ```R * checking whether package ‘lakhesis’ can be installed ... ERROR Installation failed. See ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/lakhesis/new/lakhesis.Rcheck/00install.out’ for details. ``` -------------------------------- ### R Package Installation Error Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md This snippet shows a typical error message when an R package fails to install. It indicates that the installation failed and directs the user to a log file for more details. ```text * checking whether package ‘aifeducation’ can be installed ... ERROR Installation failed. See ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/aifeducation/new/aifeducation.Rcheck/00install.out’ for details. ``` -------------------------------- ### Installation Error for geocmeans Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Shows an installation error for the 'geocmeans' R package. The error message indicates that the installation failed and directs the user to a specific file for details. ```text # geocmeans (0.3.4) * GitHub: * Email: * GitHub mirror: Run `revdepcheck::revdep_details(, "geocmeans")` for more info ## In both * checking whether package ‘geocmeans’ can be installed ... ERROR ``` Installation failed. See ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/geocmeans/new/geocmeans.Rcheck/00install.out’ for details. ``` ## Installation ``` -------------------------------- ### card_image() Usage Examples Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/card.md Demonstrates how to use the card_image() function to add images to cards, including placing them at the top, bottom, or in the middle, and how to add alternative text. ```APIDOC ## card_image() Examples ### Description This section shows various ways to use the `card_image()` function within a `card()` to display images. ### Examples 1. **Image cap on top of card** ```r show_raw_html(card(card_image("https://example.com/image.jpg"), card_body("image cap on top of card"))) ``` 2. **Image cap on bottom of card** ```r show_raw_html(card(card_body("image cap on bottom of card"), card_image("https://example.com/image.jpg"))) ``` 3. **Image with a header and body** ```r show_raw_html(card(card_header("header"), card_image("https://example.com/image.jpg"), card_body("image not a cap"))) ``` 4. **Image with custom alt text** ```r show_raw_html(card(card_image("https://example.com/image.jpg", alt = "card-img"))) ``` ``` -------------------------------- ### Initialize TypeScript Component Source: https://github.com/rstudio/bslib/blob/main/AGENTS.md Example of initializing a TypeScript component on an element with a specific data attribute. This pattern is common for integrating client-side logic with R components. ```typescript initializeComponent(el: HTMLElement) { const data = el.dataset; const componentId = data.bslibMyComponent; // ... initialize component logic using data and componentId } ``` -------------------------------- ### Run revdepcheck details Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Use this command to get more information about reverse dependency checks for a specific package. ```R revdepcheck::revdep_details(, "scRNAseqApp") ``` ```R revdepcheck::revdep_details(, "shiny.destroy") ``` ```R revdepcheck::revdep_details(, "stepssurvey") ``` -------------------------------- ### Add Bootswatch Gem to Gemfile Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bsw5/README.md Include the Bootswatch gem in your Ruby project's Gemfile to access themes. Run 'bundle install' after adding. ```ruby gem "bootswatch", github: "thomaspark/bootswatch" ``` -------------------------------- ### R Package Installation Failure: Missing Library Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md This error occurs when a package fails to load a shared object due to a missing dynamic library, often related to system dependencies like X11. Ensure all required system libraries are installed and accessible in the library path. ```R * installing *source* package ‘kuzco’ ... ** this is package ‘kuzco’ version ‘0.1.0’ ** package ‘kuzco’ successfully unpacked and MD5 sums checked ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Users/elizabethnelson/repos/bslib/revdep/library.noindex/kuzco/imager/libs/imager.so': dlopen(/Users/elizabethnelson/repos/bslib/revdep/library.noindex/kuzco/imager/libs/imager.so, 0x0006): Library not loaded: /opt/X11/lib/libX11.6.dylib Referenced from: <999B5DAC-9F0C-3A99-9E95-70D3ACDFEE77> /Users/elizabethnelson/repos/bslib/revdep/library.noindex/kuzco/imager/libs/imager.so Reason: tried: '/opt/X11/lib/libX11.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libX11.6.dylib' (no such file), '/opt/X11/lib/libX11.6.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libX11.6.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libX11.6.dylib' (no such file) Calls: ... asNamespace -> loadNamespace -> library.dynam -> dyn.load Execution halted ERROR: lazy loading failed for package ‘kuzco’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/kuzco/new/kuzco.Rcheck/kuzco’ ``` -------------------------------- ### toast with both header icon and body icon Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toast.md This example demonstrates a toast notification that includes icons in both the header and the body for distinct visual cues. ```html
H Title
B
Message content
``` -------------------------------- ### C++ Compilation and Linking Errors during R Package Installation Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md This snippet details the compilation and linking process for the 'aifeducation' R package, highlighting C++ compilation commands and linker warnings/errors. It is useful for diagnosing build issues. ```text * installing *source* package ‘aifeducation’ ... ** this is package ‘aifeducation’ version ‘1.1.5’ ** package ‘aifeducation’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.4.2)’ using SDK: ‘MacOSX26.2.sdk’ clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c KNNOR.cpp -o KNNOR.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c aux_fcts.cpp -o aux_fcts.o clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o aifeducation.so KNNOR.o RcppExports.o aux_fcts.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found ld: warning: search path '/opt/gfortran/lib' not found ld: library 'emutls_w' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [aifeducation.so] Error 1 ERROR: compilation failed for package ‘aifeducation’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/aifeducation/new/aifeducation.Rcheck/aifeducation’ ``` -------------------------------- ### Error: `bootswatch` is not a scalar string Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/bs-theme-preset.md The `bootswatch` argument in resolve_bs_preset() must be a single character string. This example demonstrates the error when a vector is provided. ```R resolve_bs_preset(bootswatch = c("a", "b")) ``` -------------------------------- ### toast() icon renders in body with header Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toast.md This example shows a toast with both a header and an icon within the toast body. It includes a 'toast-header' and 'toast-body' structure. ```html
New Mail
Message content
``` -------------------------------- ### Error: `preset` is not a scalar string Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/bs-theme-preset.md The `preset` argument in resolve_bs_preset() must be a single character string. This example demonstrates the error when a vector is provided. ```R resolve_bs_preset(preset = c("a", "b")) ``` -------------------------------- ### Error: `preset` name not found Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/bs-theme-preset.md When using resolve_bs_preset() with the `preset` argument, the provided name must exist for the specified Bootstrap version. This example shows the error for an unknown preset name. ```R resolve_bs_preset(preset = "not_a_preset", version = 4) ``` -------------------------------- ### Download Local Fonts Source: https://github.com/rstudio/bslib/blob/main/tools/README.md After installing HTML dependencies, run this script to download remote Google Fonts and include them locally within the package. This ensures fonts are available even without an internet connection. ```shell Rscript tools/fonts.R ``` -------------------------------- ### C++ Compilation Warnings and Errors Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Shows typical C++ compilation output during R package installation, including unused variable warnings and linker errors due to missing libraries. ```bash * installing *source* package ‘geocmeans’ ... ** this is package ‘geocmeans’ version ‘0.3.4’ ** package ‘geocmeans’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.4.2)’ using C++17 using SDK: ‘MacOSX26.2.sdk’ clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c FCM_functions.cpp -o FCM_functions.o FCM_functions.cpp:211:9: warning: unused variable 'k' [-Wunused-variable] ... 14 warnings generated. clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c shared_functions.cpp -o shared_functions.o clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o geocmeans.so FCM_functions.o GFCM_functions.o RcppExports.o focal_cpp.o jaccard_idx.o moran_for_rasters.o shared_functions.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found ld: warning: search path '/opt/gfortran/lib' not found ld: library 'emutls_w' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [geocmeans.so] Error 1 ERROR: compilation failed for package ‘geocmeans’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/geocmeans/new/geocmeans.Rcheck/geocmeans’ ``` ```bash * installing *source* package ‘geocmeans’ ... ** this is package ‘geocmeans’ version ‘0.3.4’ ** package ‘geocmeans’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.4.2)’ using C++17 using SDK: ‘MacOSX26.2.sdk’ clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c FCM_functions.cpp -o FCM_functions.o FCM_functions.cpp:211:9: warning: unused variable 'k' [-Wunused-variable] ... 14 warnings generated. clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geocmeans/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c shared_functions.cpp -o shared_functions.o clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o geocmeans.so FCM_functions.o GFCM_functions.o RcppExports.o focal_cpp.o jaccard_idx.o moran_for_rasters.o shared_functions.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found ld: warning: search path '/opt/gfortran/lib' not found ld: library 'emutls_w' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [geocmeans.so] Error 1 ERROR: compilation failed for package ‘geocmeans’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/geocmeans/old/geocmeans.Rcheck/geocmeans’ ``` -------------------------------- ### Send Custom Message from Server Source: https://github.com/rstudio/bslib/blob/main/AGENTS.md Example of sending a custom message from the Shiny server to the client. This is useful for global updates or server-initiated actions that don't map directly to an input. ```r session$sendCustomMessage("bslib.toggle-dark-mode", list(method = "toggle", value = "dark")) ``` -------------------------------- ### Error: `bootswatch` name not found Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/bs-theme-preset.md When using resolve_bs_preset() with the `bootswatch` argument, the provided name must exist for the specified Bootstrap version. This example shows the error for an unknown bootswatch theme name. ```R resolve_bs_preset(bootswatch = "not_a_preset", version = 4) ``` -------------------------------- ### C++ Compilation Error: Linker Command Failed Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md This snippet shows a typical C++ compilation error during R package installation. It indicates a failure in the linker command, often due to missing libraries or incorrect search paths. This error occurred during the development build of the 'lakhesis' package. ```bash * installing *source* package ‘lakhesis’ ... ** this is package ‘lakhesis’ version ‘1.1’ ** package ‘lakhesis’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.4.2)’ using C++17 using SDK: ‘MacOSX26.2.sdk’ clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/lakhesis/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/lakhesis/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/lakhesis/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/lakhesis/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c lakhesis.cpp -o lakhesis.o clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o lakhesis.so RcppExports.o lakhesis.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found ld: warning: search path '/opt/gfortran/lib' not found ld: library 'emutls_w' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [lakhesis.so] Error 1 ERROR: compilation failed for package ‘lakhesis’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/lakhesis/new/lakhesis.Rcheck/lakhesis’ ``` -------------------------------- ### C++ Compilation Error in geommc Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Shows C++ compilation commands and linker errors during the installation of the 'geommc' R package. This indicates a problem with the C++ compiler setup or missing libraries. ```bash * installing *source* package ‘geommc’ ... ** this is package ‘geommc’ version ‘1.3.2’ ** package ‘geommc’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.4.2)’ using SDK: ‘MacOSX26.2.sdk’ clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c armanormauxfns.cpp -o armanormauxfns.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c logp_vs_in.cpp -o logp_vs_in.o ... clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c matrix_manip.cpp -o matrix_manip.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/geommc/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c rw_mc.cpp -o rw_mc.o clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o geommc.so RcppExports.o armanormauxfns.o logp_vs_in.o matrix_manip.o rw_mc.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found ld: warning: search path '/opt/gfortran/lib' not found ld: library 'emutls_w' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [geommc.so] Error 1 ERROR: compilation failed for package ‘geommc’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/geommc/old/geommc.Rcheck/geommc’ ``` -------------------------------- ### Preview bslib Theme and Themer Source: https://github.com/rstudio/bslib/blob/main/README.md Launch a demo app to preview bslib UI components and the interactive theming widget. This provides a quick overview of the package's capabilities. ```r bslib::bs_theme_preview() ``` -------------------------------- ### Configure Sidebar with String Content Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/page.md Shows how to use `page_sidebar()` with a simple string for the sidebar content, controlling its open state and visibility. ```r renderTags(page_sidebar("main", title = "Title", sidebar = "side"))$html ``` -------------------------------- ### geommc Package Installation Failure Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Indicates a general installation failure for the 'geommc' R package, with a reference to a detailed log file for troubleshooting. ```bash * checking whether package ‘geommc’ can be installed ... ERROR Installation failed. See ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/geommc/new/geommc.Rcheck/00install.out’ for details. ``` -------------------------------- ### Rebuild Documentation Assets Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bs5/README.md Execute this command to rebuild the distributed CSS and JavaScript files, along with the documentation assets for Bootstrap. ```bash npm run test ``` -------------------------------- ### Create a basic toolbar with default attributes Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toolbar.md Use toolbar() to create a basic toolbar with multiple items. Defaults to right alignment and default gap spacing. ```R show_raw_html(toolbar("Item 1", "Item 2")) ``` -------------------------------- ### Customized navbar_options() Output Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/navbar_options.md Prints navbar_options() with custom background color and theme. Demonstrates how to set specific theme and background properties. ```r navbar_options(theme = "dark", bg = "red") ``` -------------------------------- ### Generate HTML structure with as.tags.bslib_toast Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toast.md Demonstrates the HTML structure generated by `as.tags.bslib_toast` for a success toast with a header. ```R cat(format(tag)) ``` -------------------------------- ### bslib Component Architecture Pattern Source: https://github.com/rstudio/bslib/blob/main/AGENTS.md Illustrates the typical structure for creating a bslib component in R, including argument separation, tag creation, dependency management, and returning an HTML fragment. Ensures Bootstrap 5 compatibility. ```R my_component <- function(arg1, ..., arg2 = default) { # 1. Separate attributes and children in dots, if needed. Useful when named # attributes become attributes on a different tag than the children. dots <- separate_arguments(...) # => list(attribs = ..., children = ...) # 2. Build htmltools tag structure tag <- div( class = "bslib-my-component", data-attribute = "value", !!!dots$attribs, !!!dots$children, # 3. Add component-specific JS/CSS dependencies, my_component_dependencies() ) # 4. Attach component dependencies (CSS/JS) tag <- tagAppendAttributes(tag, ...) tag_require(tag, version = 5) # Ensures Bootstrap 5 # 5. Return as HTML fragment as_fragment(tag) } ``` -------------------------------- ### Navbar Options with Specific Settings Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/navbar_options.md Prints navbar_options() with explicit settings for position, theme, and collapsible. Useful for defining a precise navbar appearance. ```r navbar_options(position = "static-top", theme = "auto", collapsible = TRUE) ``` -------------------------------- ### Create a toolbar select input with custom styling Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toolbar.md Apply custom CSS classes and inline styles to a toolbar select input using the `class` and `style` arguments in `toolbar_input_select()`. This allows for flexible UI integration. ```R show_raw_html(toolbar_input_select(id = "select3", label = "Select with custom class", choices = c("X", "Y", "Z"), class = "bg-success-subtle", style = "width: 400px", tooltip = FALSE)) ``` -------------------------------- ### Default navbar_options() Output Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/navbar_options.md Prints the default navbar_options() configuration. Shows default values for position, theme, collapsible, and underline. ```r navbar_options() ``` -------------------------------- ### as_fillable_container() with a simple tag with arguments Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/fill.md Creates a fillable container from a simple tag with arguments, allowing customization of container properties like height and gap. ```r cat(format(ts_fillable)) ``` -------------------------------- ### Run All Update Scripts Source: https://github.com/rstudio/bslib/blob/main/tools/README.md Execute the main update script to sequentially run all individual update scripts. This is the recommended approach to ensure correct update order. ```shell Rscript tools/main.R ``` -------------------------------- ### Basic input_submit_textarea() Usage Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/input-submit.md Demonstrates the default markup generated by input_submit_textarea() with a single argument. ```r input_submit_textarea("test") ``` -------------------------------- ### Create a basic toolbar select input Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toolbar.md Generate a select input for a toolbar using `toolbar_input_select()`. It includes a label, choices, and an icon. `tooltip = FALSE` hides the default tooltip. ```R show_raw_html(toolbar_input_select(id = "select1", label = "Basic select", choices = c("A", "B", "C"), tooltip = FALSE)) ``` -------------------------------- ### Invalid input for normalize_toast_position Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toast.md These examples demonstrate invalid inputs to `normalize_toast_position` and the resulting error messages. The function requires a single vertical and a single horizontal position. ```R normalize_toast_position("top") ``` ```R normalize_toast_position("left") ``` ```R normalize_toast_position("top bottom left") ``` ```R normalize_toast_position(c("top", "bottom", "left")) ``` ```R normalize_toast_position("top invalid") ``` ```R normalize_toast_position("foo bar") ``` -------------------------------- ### Showcase Left Center Layout Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/value-box.md Demonstrates the `showcase_left_center()` function for arranging content. This layout is suitable for side-by-side content where one element is primary. ```R showcase_left_center() ``` -------------------------------- ### Configure Sidebar Layout with `page_sidebar` Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/page.md Demonstrates setting a title, sidebar behavior ('open' = 'always'), and custom data attributes for a page with `page_sidebar()`. ```r renderTags(page_sidebar("main", title = "Title", sidebar = sidebar(open = "always"), `data-attr` = "here"))$html ``` -------------------------------- ### Create a toolbar divider with custom width and gap Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toolbar.md Configure both the `width` and `gap` of a toolbar divider using corresponding arguments in `toolbar_divider()`. These are applied as CSS variables. ```R show_raw_html(toolbar_divider(width = "5px", gap = "2rem")) ``` -------------------------------- ### Create a toolbar button with both label and icon Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toolbar.md Configure a toolbar button to display both an icon and a text label by setting 'show_label = TRUE' when an icon is provided. ```R show_raw_html(toolbar_input_button(id = "test_btn", label = "Click me", icon = shiny::icon( "star"), show_label = TRUE)) ``` -------------------------------- ### C++ Compilation Error in aifeducation Source: https://github.com/rstudio/bslib/blob/main/revdep/failures.md Shows a C++ compilation error during the installation of the 'aifeducation' R package. The error occurs during the linking stage, indicating issues with finding required libraries like 'emutls_w'. ```bash * installing *source* package ‘aifeducation’ ... ** this is package ‘aifeducation’ version ‘1.1.5’ ** package ‘aifeducation’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.4.2)’ using SDK: ‘MacOSX26.2.sdk’ clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c KNNOR.cpp -o KNNOR.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/Rcpp/include' -I'/Users/elizabethnelson/repos/bslib/revdep/library.noindex/aifeducation/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c aux_fcts.cpp -o aux_fcts.o clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o aifeducation.so KNNOR.o RcppExports.o aux_fcts.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found ld: warning: search path '/opt/gfortran/lib' not found ld: library 'emutls_w' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [aifeducation.so] Error 1 ERROR: compilation failed for package ‘aifeducation’ * removing ‘/Users/elizabethnelson/repos/bslib/revdep/checks.noindex/aifeducation/old/aifeducation.Rcheck/aifeducation’ ``` -------------------------------- ### Create a toolbar select input with grouped choices Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/toolbar.md Render a toolbar select input with grouped options by passing a named list or `optgroup` structure to the `choices` argument of `toolbar_input_select()`. This organizes choices into collapsible groups. ```R show_raw_html(grouped_select) ``` -------------------------------- ### as_fill_carrier() with a simple tag with arguments Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/fill.md Creates a fill carrier from a simple tag with arguments, combining fill item and container properties with custom styling. ```r cat(format(ts_carrier)) ``` -------------------------------- ### layout_columns with breakpoint-specific widths Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/layout.md Configure column widths for different screen sizes using the `breakpoints` helper function within `col_widths`. ```r layout_columns(col_widths = breakpoints(sm = 6, md = 4, lg = 3), !!!children) ``` -------------------------------- ### Configure Rails Assets for Bootswatch Source: https://github.com/rstudio/bslib/blob/main/inst/lib/bsw5/README.md For Ruby on Rails users, add this to an initializer to include Bootswatch theme directories in the asset pipeline. ```ruby Rails.application.config.assets.paths += Gem.loaded_specs["bootswatch"].load_paths ``` -------------------------------- ### Customized input_submit_textarea() with Options Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/input-submit.md Shows how to customize input_submit_textarea() with various arguments like label, placeholder, initial value, width, rows, custom button, toolbar, submit key, and input attributes. ```r input_submit_textarea("test", label = "Enter text", placeholder = "Type here...", value = "Initial value", width = 300, rows = 3, button = tags$button(id = "custom_submit", class = "btn btn-primary", "Send"), toolbar = tagList(tags$span("Press"), tags$kbd("Enter"), tags$span("to submit")), submit_key = "enter", spellcheck = "false", autocomplete = "off", ) ``` -------------------------------- ### Showcase Bottom Layout Source: https://github.com/rstudio/bslib/blob/main/tests/testthat/_snaps/value-box.md Shows the `showcase_bottom()` function, ideal for layouts where content should be anchored to the bottom of the viewing area. ```R showcase_bottom() ```