小编Cla*_*dio的帖子

Markdown:在嵌套列表之后继续列表中的文本

我需要在列表中插入子列表,然后继续项目中的文本:

1. Start of the item text
    - First item of sublist;
    - Second item of sublist;

More text of the first item.

2. Second Item

3. Third item
Run Code Online (Sandbox Code Playgroud)

嵌套列表后面的文本在渲染后未正确对齐(应与“Start”对齐,与“1.”对齐)。有什么建议吗?

markdown list

5
推荐指数
1
解决办法
1291
查看次数

将卷曲 (`{{ }}`) 运算符与 `if` 子句一起使用时出错

我正在努力理解如何使用{{ }}运算符在自定义函数中传递裸变量名称。当我将运算符与子句结合使用时,出现错误if。

该函数的工作原理:

f <- function(.data, .vars=NULL){
  require(dplyr)
  df = select(.data, {{ .vars }})
  print(head(df))
}

f(iris, c(Species, Sepal.Length))
#> Loading required package: dplyr
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
#>   Species Sepal.Length
#> 1  setosa          5.1
#> 2  setosa          4.9
#> 3  setosa          4.7
#> 4  setosa          4.6
#> 5 …
Run Code Online (Sandbox Code Playgroud)

r rlang

4
推荐指数
1
解决办法
323
查看次数

标签 统计

list ×1

markdown ×1

r ×1

rlang ×1