R 語言

R tutorial

 

Make sure you are logged out.
  • Hit CTRL+ALT+F1 and login using your credentials.
  • kill your current X server session by typing sudo service lightdm stop or sudo lightdm stop
  • Enter runlevel 3 by typing sudo init 3 and install your *.run file.
  • You might be required to reboot when the installation finishes. If not, run sudo service lightdm start or sudo start lightdm to start your X server again.
  •  
  • http://askubuntu.com/questions/149206/how-to-install-nvidia-run
  •  

 

 

You can also use gdebi, a tool similar to dpkg that also resolves any dependencies needed for the package to work.
You just need to install gdebi (sudo apt-get install gdebi), and then run:
sudo gdebi /PATH/TO/PACKAGE.deb
http://askubuntu.com/questions/264292/how-do-i-install-virtualboxs-deb-package

 

 

Installing Rpud on Ubuntu 14.04     


 Installing CUDA Toolkit 7.5 on Ubuntu 14.04 Linux

 

  machine learning and TensorFlow. 

Install TensorFlow from Source on Ubuntu 16.04

Deep Learning in R 


 

 



Machine Learning is Fun! Part 3: Deep Learning and Convolutional Neural Networks

 

DEEP LEARNING FOR IMAGE CLASSIFICATION
  List of available deep learning methods across the R packages.

Deep Learning at Stanford

Neural Networks with R – A Simple Example
Deep Learning Tutorial

 

THE MNIST DATABASE - Yann LeCun's Home Page 

 

R Package Deepnet: Training and Testing the MNIST dataset

 

Package deepnet

 

Var1 <- c(rnorm(50, 1, 0.5), rnorm(50, -0.6, 0.2))
Var2 <- c(rnorm(50, -0.8, 0.2), rnorm(50, 2, 1))
x <- matrix(c(Var1, Var2), nrow = 100, ncol = 2)
y <- c(rep(1, 50), rep(0, 50))
nn <- nn.train(x, y, hidden = c(5))
## predict by nn
test_Var1 <- c(rnorm(50, 1, 0.5), rnorm(50, -0.6, 0.2))
test_Var2 <- c(rnorm(50, -0.8, 0.2), rnorm(50, 2, 1))
test_x <- matrix(c(test_Var1, test_Var2), nrow = 100, ncol = 2)
yy <- nn.predict(nn, test_x)

 

 

GPU Computing with R

進入R 裝套件 執行

 install.packages()
 
 
再R執行 
source('so.R')
 
R CMD BATCH so.R
 
 
http://www.r-tutor.com/
 
下載 RPUX 
 

How do I install an R package from source?

 

解壓:tar zxvf FileName.tar.gz

 
$ R CMD INSTALL rpud_0.6.1.tgz
$ R CMD INSTALL rpudplus_0.6.1.tgz



https://mirrors.tuna.tsinghua.edu.cn/CRAN/


sudo apt-get update
sudo apt-get install r-base
 
https://www.rstudio.com/products/rstudio/download-server/ 
 
$ sudo apt-get install gdebi-core

$ wget https://download2.rstudio.org/rstudio-server-1.0.136-i386.deb

$ sudo gdebi rstudio-server-1.0.136-i386.deb
  

Download R 3.2.3 for Windows







install.packages("devtools", dependencies = TRUE) (參考)
 install.packages("RCurl", dependencies = TRUE)

download.file
#______Download And Run Code ______#
URL      <- "http://rfunction.com/code/1202/120222.R"
destfile <- "downloaded/120222.R"

#setting working directories
setwd("C:/Users/user/Desktop/test_R/")

download.file(URL, destfile)
source(destfile)
ls()










R语言初学指南(笔记)



使用R
我才知道R有那麼方便的包,喜歡死了。
R起碼有兩個包可以方便獲取全球範圍內的股票資料:
quantmod
tseries
我更喜歡後者:data_ts<-get.hist.quote(instrument='601398.ss',start='2008-05-10',end='2010-03-20')
但quantmod的作圖比較猛。
myghq <- tseries::get.hist.quote


Examples

con <- url("http://quote.yahoo.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
  close(con)
  x <- tseries::get.hist.quote(instrument = "^gspc", start = "1998-01-01",
                      quote = "Close")
  plot(x)

  x <- tseries::get.hist.quote(instrument = "ibm", quote = c("Cl", "Vol"))
  plot(x, main = "International Business Machines Corp")

  spc <- tseries::get.hist.quote(instrument = "^gspc", start = "1998-01-01",
         quote = "Close")
  ibm <- tseries::get.hist.quote(instrument = "ibm",  start = "1998-01-01",
         quote = "AdjClose")
  require("zoo")  # For merge() method.
  x <- merge(spc, ibm)
  plot(x, main = "IBM vs S&P 500")
}

con <- url("http://www.oanda.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
  close(con)
  x <- tseries::get.hist.quote(instrument = "EUR/USD", provider = "oanda",
                      start = Sys.Date() - 500)
  plot(x, main = "EUR/USD")
}

沒有留言:

張貼留言