Skip to content

Instantly share code, notes, and snippets.

View beatrizmilz's full-sized avatar

Beatriz Milz beatrizmilz

View GitHub Profile
# remotes::install_github("rstudio/shiny")
# remotes::install_github("rstudio/bslib@dev")
# remotes::install_github("rstudio/bsicons")
library(shiny)
library(bslib)
library(bsicons)
card1 <- navs_tab_card(
title = "HTML Widgets",
library(magrittr)
id <- googledrive::as_id("1cBZc8_YqZB7bQYxjn9G9tHfggT77plk5UggSaW08jQqgWWoaskST5uFh4YcPtPLeL57se_Db")
infos <- googledrive::drive_ls(id)
dados_arquivos <- infos %>%
dplyr::mutate(pessoa = purrr::map_chr(
drive_resource, purrr::pluck, "lastModifyingUser", "displayName"
)) %>%
dplyr::mutate(
@z3tt
z3tt / github.R
Last active April 30, 2024 15:38
Configure GitHub for Rstudio
#### 1. Sign up at GitHub.com ################################################
## If you do not have a GitHub account, sign up here:
## https://github.com/join
# ----------------------------------------------------------------------------
#### 2. Install git ##########################################################
## If you do not have git installed, please do so:
# =======================================
# = Enhancements to data tidying =
# = Hadley Wickham =
# = https://rstd.io/tidyhancements-2019 =
# =======================================
# What is tidy data? ----------------------------------------------------------
# 1. Each column is a variable.
# 2. Each row is an observation.
# 3. Each cell is a value.
@gadenbuie
gadenbuie / xaringan-decouple-code-plot.Rmd
Last active November 22, 2021 16:54
Decouple code and plots (or results) in xaringan slides
---
title: "Decouple Code and Output in xaringan slides"
subtitle: "Demo Slides for <a href='https://garrickadenbuie.com/blog/2018/08/14/decouple-code-and-output-in-xaringan-slides/'>Related Blog Post</a>"
author: "Garrick Aden-Buie"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
ratio: 16:9
@jjesusfilho
jjesusfilho / br_gender.R
Last active August 20, 2020 08:42
Atribui sexo aos nomes completos ou não conforme base do IBGE br_gender
#' Atribui sexo a nomes com base no primeiro nome a partir da base do IBGE.
#'
#' @param nomes Vetor com os nomes completos ou não para realizar a busca.
#'
#' @return tibble com cinco colunas: primeiro_nome,f para feminino, m para masculino,sexo e nomes=para o nome
#' @export
#'
#' @examples
br_gender <- function(nomes) {
@jjesusfilho
jjesusfilho / toTitleCasePT.R
Last active January 18, 2024 17:33
Converts Portuguese strings to Title Case
#' Convertion to title case with lower case for some classes of words.
#'
#' In written Portuguese, when converting to title case, it is not usual
#' to keep in title case some words, like prepositions, conjunctions,
#' articles and some kinds of pronouns. This functions locates those
#' cases and converts them to lower case.
#'
#' @param string vector of characters to be converted to title case
#' but with connector words (one-word prepositions and conjunctions)
#' and articles (both definite and indefinite) and some pronouns
@jjesusfilho
jjesusfilho / busca_fuzzy.R
Last active January 30, 2024 16:12
Busca_fuzzy.R procura a palavra ou frase do segundo vetor que melhor se aproxima do primeiro. Particularmente útil para corrigir nomes de municípios.
#' Procura a palavra ou frase do segundo vetor que melhor
#' se aproxima do primeiro. Particularmente útil para
#' corrigir nomes de municípios.
#'
#' @param x Vetor de strings de referência.
#' @param y Vetor de strings a serem buscados.
#'
#' @return vetor com as strings de y próximos
#' de x.
#' @export
@joyrexus
joyrexus / README.md
Last active January 21, 2024 21:51 — forked from btoone/curl.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output