knitr::opts_chunk$set( collapse = TRUE, comment = "#>", echo = FALSE ) library(magrittr)
if(params$download_material == TRUE){ glue::glue("- [Clique aqui](https://github.com/curso-r/{params$main_repo}/raw/master/material_do_curso.zip) para baixar o material do curso.") }
Nosso blog: https://curso-r.com/blog/
Nossos livros: Ciência de Dados em R e Zen do R
Fora do horário de aula ou monitoria:
perguntas gerais sobre o curso deverão ser feitas no Classroom.
perguntas sobre R, principalmente as que envolverem código, deverão ser enviadas no nosso fórum.
paths <- CursoRopen:::list_github_files(params$main_repo, "slides/", "*html$") %>% tibble::enframe(value = "paths") %>% dplyr::filter(!stringr::str_detect(paths, "figure-html")) %>% dplyr::mutate(file_path_sem_extencao = tools::file_path_sans_ext(paths)) %>% dplyr::select(-name) paths_pdf <- CursoRopen:::list_github_files(params$main_repo, "slides/", "*pdf$") %>% tibble::enframe(value = "paths_pdf") %>% dplyr::mutate(file_path_sem_extencao = tools::file_path_sans_ext(paths_pdf)) %>% dplyr::select(-name) dplyr::left_join(paths, paths_pdf, by = "file_path_sem_extencao") %>% dplyr::mutate( slide = paths, link = paste0("https://curso-r.github.io/", params$main_repo, "/", slide), slides = glue::glue("[{basename(slide)}]({link})"), slide_pdf = paths_pdf, link_pdf = paste0("https://curso-r.github.io/", params$main_repo, "/", slide_pdf), pdf = glue::glue("[{basename(slide_pdf)}]({link_pdf})") ) %>% dplyr::filter(!stringr::str_detect(slide, "_files/")) %>% dplyr::select(slides, pdf) %>% knitr::kable()
pasta <- "exemplos_de_aula/" knitr::kable( tibble::tibble( script = CursoRopen:::list_github_files(params$main_repo, pasta, ".R$"), link = paste0( "https://github.com/curso-r/", params$main_repo, "/blob/master/", script ) ) %>% dplyr::mutate(script = glue::glue("[{script}]({link})")) %>% dplyr::select(script) )
pasta <- "/praticas" hh <- httr::add_headers() req <- httr::GET(paste0( "https://api.github.com/repos/", "curso-r", "/", "202204-visualizacao", "/git/trees/main?recursive=1" ), hh) arquivos <- unlist( lapply(httr::content(req)$tree, "[", "path"), use.names = FALSE ) arquivos <- grep("praticas", arquivos, value = TRUE, fixed = TRUE) arquivos <- grep("R$", arquivos, value = TRUE) tab <- tibble::tibble( script = arquivos, link = paste0( "https://github.com/curso-r/", params$turma, "/blob/main/", script ) ) %>% dplyr::mutate(script = glue::glue("[{script}]({link})")) %>% dplyr::select(script) if (nrow(tab) > 0) { knitr::kable(tab) } else { "Os arquivos serão disponibilizados após a primeira aula" }
tibble::tibble( nome = CursoRopen:::list_github_files(params$main_repo, "exercicios/"), link = paste0("https://curso-r.github.io/", params$main_repo, "/", nome), exercicio = glue::glue("[{nome}]({link})") ) %>% dplyr::filter( !stringr::str_detect(nome, "resolucao_"), stringr::str_detect(nome, "R$") ) %>% dplyr::select(exercicio) %>% knitr::kable()
tibble::tibble( nome = c( "Amilcar L. do Prado G. Gramacho", "Saulo Valentim" ), script = c( "https://github.com/amilcar-pg/dia_a_dia_amigos", "https://github.com/curso-r/202204-visualizacao/blob/main/trabalhos_premiados/visualizacao_board_games.Rmd" ), link = c( "https://amilcar-pg.github.io/dia_a_dia_amigos/#1", "https://curso-r.github.io/202204-visualizacao/trabalhos_premiados/visualizacao_board_games.html" ) ) |> dplyr::mutate(dplyr::across( -nome, .fns = \(.x) stringr::str_glue("[{dplyr::cur_column()}]({.x})") )) |> knitr::kable()
Referências extras relacionadas com o conteúdos das aulas, ou materiais que comentamos quando tiramos dúvidas (não necessariamente são relacionadas com o conteúdo da aula).
safe_buscar_materiais_extras <- purrr::possibly( .f = function(main_repo = params$main_repo, trilha_clean = params$trilha_clean){ library(magrittr, include.only = "%>%") googlesheets4::gs4_deauth() googledrive::drive_deauth() id_spreadsheet <- "1YV2vz52u2HXw1IhjrJ7dGhk7sim-9zRM" %>% googledrive::as_id() %>% googledrive::drive_ls() %>% dplyr::filter(name %in% params$trilha_clean) %>% dplyr::pull(id) %>% googlesheets4::as_sheets_id() id_spreadsheet %>% googlesheets4::read_sheet(stringr::str_remove(main_repo, "main-")) %>% dplyr::mutate(link = glue::glue("[{desc}]({url})")) %>% dplyr::select(-desc,-url) %>% dplyr::arrange(aula) %>% dplyr::select(-aula) |> # dplyr::filter(aula <= params$num_aula) %>% knitr::kable(col.names = c("Tema", "Descrição")) }, "erro") tabela <- safe_buscar_materiais_extras() if (tabela[1] == "erro") { print("Verificar tabela de materiais extras") } else{ tabela }
Youtube: https://www.youtube.com/c/CursoR6/featured
Instagram: https://www.instagram.com/cursoo_r/
Twitter: https://twitter.com/curso_r
Linkedin: https://www.linkedin.com/company/curso-r/
Facebook: https://www.facebook.com/cursodeR
# Criar arquivo _config.yml if(params$download_material == TRUE){ glue::glue('theme: jekyll-theme-minimal', '\n', "logo: assets/logo.png", '\n', "title: {params$nome_curso}", '\n', "show_downloads: true", '\n', "link_material: 'https://github.com/curso-r/{params$main_repo}/raw/master/material_do_curso.zip'", '\n' ) %>% readr::write_lines( "_config.yml") } if(params$download_material == FALSE){ glue::glue('theme: jekyll-theme-minimal', '\n', "logo: assets/logo.png", '\n', "title: {params$nome_curso}", '\n', "show_downloads: false", '\n') %>% readr::write_lines( "_config.yml") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.