View reactivity_drivers.R
# remotes::install_github(c('yonicd/reactor@73c6285','yonicd/puzzlemath@17def58')) | |
library(reactor) | |
library(puzzlemath) | |
obj1 <- init_reactor()%>% | |
set_golem_args(package_name = 'puzzlemath')%>% | |
set_chrome_driver( | |
chromever = chrome_version() | |
)%>% | |
start_reactor() |
View app.R
library(whereami) | |
library(ggplot2) | |
if(!file.exists('cars.csv')){ | |
readr::write_csv(mtcars,path = 'cars.csv') | |
} | |
# Define the UI | |
ui <- fluidPage( | |
sidebarLayout( |
View canvasAce
library(shiny) | |
library(shinyAce) | |
modes <- getAceModes() | |
themes <- getAceThemes() | |
init <- "createData <- function(rows) { | |
data.frame(col1 = 1:rows, col2 = rnorm(rows)) | |
}" |
View html2tagList.R
#'@title html2tagList | |
#'@description convert raw html to htmltools tagList | |
#'@param x character vector of html | |
#'@examples | |
#' | |
#'x<-'<h1>Title</h1> | |
#' <h2>Header text</h2> | |
#' <p>Text here</p> | |
#' <h1>Title</h1> | |
#' <h2>Header text</h2> |
View cvs_rvest.R
library(xml2) | |
library(rvest) | |
library(glue) | |
library(dplyr) | |
library(purrr) | |
library(purrrogress) | |
library(ggmap) | |
library(ggplot2) | |
srm <- function(x,pat = '\\t+|\\n+',replace = '') gsub(pat,replace,x) |
View anandwrite_twitter_survey_replies.R
library(magrittr) | |
library(rtweet) | |
root_status <- '1116361675618361345' | |
x1 <- rtweet::lookup_tweets(root_status) | |
# The question | |
cat(x1$text) | |
#> Who do you: |
View runloc.R
runloc <- function(path_expand = FALSE){ | |
src <- 'Untitled' | |
if(rstudioapi::getActiveDocumentContext()$id=='#console') | |
src <- 'Console' | |
if(length(getSrcFilename(sys.call(sys.nframe()-1)))>0) | |
src <- file.path( | |
getSrcDirectory(sys.call(sys.nframe()-1)), |
View ghnet_ropenscilabs.R
remotes::install_github('yonicd/ghnet') | |
library(ghnet) | |
# get current github R repos using gepuro json file | |
universe <- fetch_gepuro() | |
# filter to ropenscilabs repos only | |
ropenscilabs_repos <- universe%>% | |
dplyr::filter(owner=='ropenscilabs')%>% |
View .block
license: mit |
View app.R
library(rtweet) | |
library(slickR) # remotes::install_github('metrumresearchgroup/slickR') | |
tweets <- rtweet::search_tweets("#rstats", n = 5, include_rts = FALSE) | |
# https://github.com/mkearney/rtweet/pull/305/files | |
tweet_embed <- function(screen_name,status_id,...){ | |
stem <- 'https://publish.twitter.com/oembed' | |
NewerOlder