Skip to content

Instantly share code, notes, and snippets.

@ishida-m
ishida-m / forCheck.R
Last active August 29, 2015 14:26
forCheck.R
## you need Administrative privileges to instaill following libraries # if(!require (devtools)) {}
install.packages("devtools",dependencies = TRUE)
install.packages("rmarkdown",dependencies = TRUE)
install.packages("ggplot2",dependencies = TRUE)
install.packages("dplyr",dependencies = TRUE)
install.packages("shiny",dependencies = TRUE)
install.packages("ggmap",dependencies = TRUE)
install.packages("twitteR",dependencies = TRUE)
install.packages("Rcpp",dependencies = TRUE)
install.packages("stringr",dependencies = TRUE)
@ishida-m
ishida-m / mecab.sh
Last active December 18, 2016 08:23
mecab installer
#!/bin/sh
# wget http://mecab.googlecode.com/files/mecab-0.996.tar.gz
curl -OL http://mecab.googlecode.com/files/mecab-0.996.tar.gz
if [ -f mecab-0.996.tar.gz ]; then
tar zxf mecab-0.996.tar.gz
cd mecab-0.996
./configure --with-charset="utf8"
@ishida-m
ishida-m / Aozora.R
Last active December 11, 2019 07:18
download a file from Aozora Bunko and unzip the file, convert it to UTF-8 format on R
# USAGE:
# source ("Aozora.R")
# `Aozora ("http://www.aozora.gr.jp/cards/000129/files/42375_ruby_18247.zip", "output.txt") `
Aozora <- function(url = NULL, txtname = NULL){
enc <- switch(.Platform$pkgType, "win.binary" = "CP932", "UTF-8")
if (is.null(url)) stop ("specify URL")
tmp <- unlist (strsplit (url, "/"))
tmp <- tmp [length (tmp)]
curDir <- getwd()