R语言【cli】——builtin_theme():内置的CLI主题

Package cli version 3.6.0


Description

此主题始终处于活动状态,并且位于主题堆栈的底部。


Usage

R 复制代码
builtin_theme(dark = getOption("cli.theme_dark", "auto"))

Argument

参数【dark】:是否使用黑暗主题。cli.theme_dark选项可用于显式请求暗主题。如果没有设置,或者设置为"auto",那么cli会尝试检测暗主题,这在最近的RStudio版本和macOS上的term中都有效。


Value

一个命名列表,一个CLI主题。


Examples

R 复制代码
cli_h1("Heading 1")
cli_h2("Heading 2")
cli_h3("Heading 3")

cli_par()
cli_alert_danger("Danger alert")
cli_alert_warning("Warning alert")
cli_alert_info("Info alert")
cli_alert_success("Success alert")
cli_alert("Alert for starting a process or computation",
  class = "alert-start")
cli_end()

cli_text("Packages and versions: {.pkg cli} {.version 1.0.0}.")
cli_text("Time intervals: {.timestamp 3.4s}")

cli_text("{.emph Emphasis} and  {.strong strong emphasis}")

cli_text("This is a piece of code: {.code sum(x) / length(x)}")
cli_text("Function names: {.fn cli::simple_theme}")

cli_text("Files: {.file /usr/bin/env}")
cli_text("URLs: {.url https://r-project.org}")

cli_h2("Longer code chunk")
cli_par(class = "code R")
cli_verbatim(
  '# window functions are useful for grouped mutates',
  'mtcars %>%',
  '  group_by(cyl) %>%',
  '  mutate(rank = min_rank(desc(mpg)))')
相关推荐
星星法术嗲人3 分钟前
【Java】—— 集合框架:Collections工具类的使用
java·开发语言
黑不溜秋的17 分钟前
C++ 语言特性29 - 协程介绍
开发语言·c++
一丝晨光22 分钟前
C++、Ruby和JavaScript
java·开发语言·javascript·c++·python·c·ruby
天上掉下来个程小白24 分钟前
Stream流的中间方法
java·开发语言·windows
xujinwei_gingko35 分钟前
JAVA基础面试题汇总(持续更新)
java·开发语言
sp_wxf44 分钟前
Lambda表达式
开发语言·python
Fairy_sevenseven1 小时前
【二十八】【QT开发应用】模拟WPS Tab
开发语言·qt·wps
蜡笔小新星1 小时前
Python Kivy库学习路线
开发语言·网络·经验分享·python·学习
凯子坚持 c1 小时前
C语言复习概要(三)
c语言·开发语言
无限大.1 小时前
c语言200例 067
java·c语言·开发语言