This file contains hidden or 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
library(sorvi) | |
sp <- GetHSY("Vaestoruudukko") # Hae HSY:n Vaestoruudukko-data | |
df <- as.data.frame(sp) # Tutki aineiston sisaltoa | |
at <- c(seq(0, 2000, 250), Inf) | |
q <- PlotShape(sp, "ASUKKAITA", type = "oneway", at = at, ncol = length(at)) # Piirra kuva |
This file contains hidden or 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
library(sorvi) | |
library(rgeos) | |
library(rgdal) | |
library(maptools) | |
library(gpclib) | |
if (!gpclibPermit()) { gpclibPermit() } | |
# ---------------------------------------------- | |
# Lue nykyiset kuntarajat Maanmittauslaitoksen aineistosta |
This file contains hidden or 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
plot(c(1,2,3)) |
This file contains hidden or 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
# Plot a Motion Chart using googleVis package - a brief example | |
# Leo Lahti 2012 | |
# Load the library | |
# Note: requires flash and internet connection | |
# use install.packages("googleVis") to install the library if needed | |
library(googleVis) | |
# Form a motion chart from 'Fruits' example data | |
# NOTE: the data set ('Fruits' in this example) must be given as data.frame |
This file contains hidden or 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
library(pxR) | |
################################################################# | |
# | |
# File: read.px.R | |
# Purpose: reads a PC-Axis file into R | |
# | |
# Created: 20110618 | |
# Authors: fvf, cjgb, opl | |
# |
This file contains hidden or 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
library(microbiome) | |
hitchip <- list() | |
for (method in c("nmf", "sum", "rpa")) { | |
tab <- read.profiling(level = "L1", method = method, data.dir = "./", log10 = TRUE) | |
colnames(tab) <- toupper(gsub("\\.", "", colnames(tab))) | |
hitchip[[method]] <- tab | |
} |
This file contains hidden or 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
library(shiny) | |
library(ggplot2) | |
shinyServer(function(input, output) { | |
dataset <- reactive(function() { | |
diamonds[sample(nrow(diamonds), input$sampleSize),] | |
}) | |
output$plot <- reactivePlot(function() { |
This file contains hidden or 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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<script src='http://polychart.com/s/third_party/polychart2.standalone.js' type='text/javascript'></script> | |
<style> | |
.rChart { | |
display: block; |
This file contains hidden or 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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='//cdn.oesmith.co.uk/morris-0.4.2.min.css'> | |
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script> |
This file contains hidden or 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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='//cdn.oesmith.co.uk/morris-0.4.2.min.css'> | |
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script> |
OlderNewer