(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
library(shiny) | |
library(datasets) | |
Logged = FALSE; | |
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
# Define server logic required to summarize and view the selected dataset | |
shinyServer(function(input, output) { | |
source("www/Login.R", local = TRUE) | |
observe({ | |
if (USER$Logged == TRUE) { |
--- | |
title: Slidify Playground | |
subtitle: Adapted from OpenCPU MarkdownApp | |
author: Ramnath Vaidyanathan | |
framework: io2012 | |
widgets: [mathjax] | |
--- | |
## Normal Distribution |
library(KFAS) | |
library(rstan) | |
data(GlobalTemp) | |
model_dlm1a <- stan_model("../stan/dlm1a.stan") | |
y <- as.matrix(GlobalTemp) | |
data <- | |
within(list(), | |
{ |
set.seed(42) | |
dat <- rnorm(1) | |
shinyServer(function(input, output) { | |
fetchData <- reactive(function() { | |
invalidateLater(1000) | |
qt <- rnorm(1) | |
dat <<- c(dat, qt) | |
dat | |
}) | |
output$plot_dat <- reactivePlot(function() { plot(fetchData(), type='l') }) |
\documentclass[UTF8,10pt]{ctexart} | |
\usepackage[a4paper,%%textwidth=129mm,textheight=185mm, %%193-8 | |
text={160mm,260mm},centering]{geometry} | |
\pagestyle{empty} | |
\begin{document} | |
\title{用散点图示范ggplot2的核心概念} | |
\author{肖凯} | |
\maketitle | |
\abstract{ | |
本文稿是第五届R语言会议演讲内容的一部分,试图用散点图示例来说明ggplot2包的核心概念,以方便初学者快速上手。同时这也是笔者应用knitr包的一个练习。该示例所用数据是ggplot2包内带的mpg数据集。} |
from django.contrib import admin | |
class ReadOnlyModelAdmin(admin.ModelAdmin): | |
""" | |
ModelAdmin class that prevents modifications through the admin. | |
The changelist and the detail view work, but a 403 is returned | |
if one actually tries to edit an object. |
#!/usr/bin/env python | |
# kd-tree index and nearest neighbour search | |
# includes doctests, run with: python -m doctest kdtree.py | |
class KDTree(object): | |
""" | |
kd-tree spatial index and nearest neighbour search | |
http://en.wikipedia.org/wiki/Kd-tree | |
""" |