This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Manual classification of observations | |
#' | |
#' \code{classify} launches a Shiny app to manually classify a subset of observations. | |
#' | |
#' @param x A character vector. | |
#' @param btn_labels A character vector of length 2 corresponding to 0 and 1. | |
#' @return A vector of 0/1 for each element in \code{x}. | |
#' @export | |
#' @examples \dontrun{ | |
#' foo <- sprintf('%s (%.2f miles per gallon)', rownames(mtcars), mtcars$mpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="JavaScript"> | |
$(function() { | |
/* Lets the user click on the images to view them in full resolution. */ | |
$("div.figure img").wrap(function() { | |
var link = $('<a/>'); | |
link.attr('href', $(this).attr('src')); | |
link.attr('title', $(this).attr('alt')); | |
link.attr('target', '_blank'); | |
return link; | |
}); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# daily_stats has 5 columns used by this code: date, time_spent_10/25/50/75/90 | |
ggplot(daily_stats) + | |
geom_segment(aes(x = date, xend = date, y = time_spent_10, yend = time_spent_90), | |
size = 1, color = "#00af89") + | |
geom_segment(aes(x = date, xend = date, y = time_spent_25, yend = time_spent_75), | |
size = 2, color = "#14866d") + | |
# geom_ribbon(aes(x = date, ymin = time_spent_lower, ymax = time_spent_upper), alpha = 0.3) + | |
# geom_line(aes(x = date, y = time_spent_middle)) + | |
geom_label( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "index_hadoop", | |
"spec": { | |
"ioConfig": { | |
"type": "hadoop", | |
"inputSpec": { | |
"paths": "hdfs://analytics-hadoop/tmp/gsc-all.csv.gz", | |
"type": "static" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Printing chunk engine via hook" | |
output: github_document | |
--- | |
```{r setup, include=FALSE} | |
library(knitr) | |
opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE) | |
print_engine_hook <- function(before, options, envir) { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Sympy Engine" | |
output: html_notebook | |
editor_options: | |
chunk_output_type: inline | |
--- | |
Assuming the "sympy" knitr engine has been registered: | |
```{sympy, results='asis'} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.