#' create teaching outline timetable in Word
#' @param outlinelist the course's outline line defined in R list
#' @param teachdate date list by teach_date()
#' @param weekclass classes of a week
#' @return data for timetable in word
#' @export
#' @examples
#' outline <- list(学位论文写作指引="内容:学术论文的特征、如何选题、如何论证等。 阅读:《写作是一门艺术》",特征价格法="内容:特征价格法的原理、估价模型、软件实现等。 阅读:课件",层次分析法="内容:层次分析法的定义、应用与计算。 阅读:课件和相关论文。",模糊层次分析法="内容:模糊层次分析法定义、应用和计算 。 阅读:课件和相关论文",机器学习法1="内容:有监督学习算法 。 阅读:课件",机器学习法2="内容无监督学习算法: 。 阅读:课件")
#'data <- gmdata::teach_date("2017-03-02")
#'data2 <- data[1:6]
#'create_timetable(outline,data2)
#'
create_timetable <- function(outlinelist, teachdate,weekclass=3){
library(magrittr)
title <- names(outlinelist)
res <- 1:length(outlinelist) %>%
purrr::map2(teachdate, ~paste0(.y, "\t",weekclass,"\tTopic(主题): ", gsub("_"," ",title[.x])," ",outlinelist[.x])) %>%
unlist
return(cat(res,sep="\n"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.