如果R中存在链接,则插入Youtube链接

时间:2018-11-10 19:49:24

标签: r r-markdown

我有这个小标题:

structure(list(stem = "In what place was Christmas once illegal?", 
    img_vid = "Enter Link", correct = "Russia", d1 = "Brazil", 
    d2 = "England", d3 = "France", exp = "Enter Explanation", 
    exp_img_vid = "Enter Link"), row.names = c(NA, -1L), class = c("tbl_df", 
"tbl", "data.frame"), spec = structure(list(cols = list(stem = structure(list(), class = c("collector_character", 
"collector")), img_vid = structure(list(), class = c("collector_character", 
"collector")), correct = structure(list(), class = c("collector_character", 
"collector")), d1 = structure(list(), class = c("collector_character", 
"collector")), d2 = structure(list(), class = c("collector_character", 
"collector")), d3 = structure(list(), class = c("collector_character", 
"collector")), exp = structure(list(), class = c("collector_character", 
"collector")), exp_img_vid = structure(list(), class = c("collector_character", 
"collector"))), default = structure(list(), class = c("collector_guess", 
"collector"))), class = "col_spec"))

如果视频的链接位于img_videxp_img_vid列中,我想将YouTube视频嵌入RMarkdown中。

我当时在考虑使用if语句,但是如果嵌入链接的语法是
,我该怎么做呢? ![Video Title](Video Link)

谢谢

0 个答案:

没有答案