taiwanrusergroup / dsc2014tutorial Goto Github PK
View Code? Open in Web Editor NEW台灣資料科學愛好者年會的資料科學上手課程的輔助用套件
台灣資料科學愛好者年會的資料科學上手課程的輔助用套件
Hi,
A simple question. I run the script from https://github.com/TaiwanRUserGroup/DSC2014Tutorial on my Mac OS X.
But I get many messages like this "tar: Failed to set default locale"
And also the warning:
"Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'whisker'
2: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'ggvis'
3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'e1071'
4: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'caret'
5: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'randomForest'"
Is this OK or I need to do something else to make sure "DSC2014Tutorial" is fine on my Mac?
Thank you
因為這是屬於套件安裝的部份,所以issue還是開在這裡了
問題出在user的scales底下的munsell的colorspace過於老舊
是否在安裝套件前先執行個update指令?
需要幫Basic製作helper function
在https://github.com/KuiMing/graphics
更新了投影片和salary.RData,salary.RData在WINDOWS的中文編碼問題還是得請WUSH大大幫忙一下,應該跟之前一樣處理即可。
另外新增df_browser.RData,此檔無中文。
Jerry 回報,加入 type = "win.binary" 會導致安裝失敗。
deps <- available.packages("http://taiwanrusergroup.github.io/R/src/contrib")[1,"Imports"]
參照的packages url失效了,有辦法更新嗎?
sudo apt-get install libcurl4-openssl-dev libxml2-dev
sudo apt-get install libcurl4-openssl-dev libxml2-dev espeak
reshape2 裡面的dcast 在windows系統下沒辦法用中文參數,建議改用reshape裡面的cast (Data Analysis)
dat1 <- readRDS(DA_file("estate_linux.rds"))
Error: could not find function "DA_file"
nrow(dat1)
Error: object 'dat1' not found
# random sampling
head(dat1[sample(1:nrow(dat1),6),])
Error: object 'dat1' not found
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository http://taiwanrusergroup.github.io/R/bin/windows/contrib/3.0
Warning in install.packages :
package ‘DSC2014Tutorial’ is not available (for R version 3.0.2)
而不是 RBasic_Revised 的版本
trying URL 'http://cran.csie.ntu.edu.tw/bin/windows/contrib/3.1/slam_0.1-32.zip'
Content type 'application/zip' length 111497 bytes (108 Kb)
opened URL
downloaded 28 Kb
Warning in install.packages :
downloaded length 28672 != reported length 111497
參考資料
在R console鍵入
install.packages("installr"); require(installr)
updateR()
在ubuntu指令列中鍵入
sudo apt-get remove r-base-core
sudo gedit /etc/apt/sources.list
增加下列文字
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get install r-base
做完直接開啟R檢查版本即可
> slides("Basic")
錯誤: 沒有這個函數 "slides"
> slides("ETL")
錯誤: 沒有這個函數 "slides"
> slides("Visualization2")
錯誤: 沒有這個函數 "slides"
> slides("Visualization3")
錯誤: 沒有這個函數 "slides"
Current only estate_linux.rds
data(salary,package='DSC2014Tutorial')
colnames(salary_cpi)[3]='cpi'
as title
(Visualization/slide2/lecture_ggplot2/index.html#36)
I got this message:
ERROR: dependencies ‘wordcloud’, ‘gridExtra’ are not available for package ‘DSC2014Tutorial’
After manually install these two packages, I could install ‘DSC2014Tutorial’ successfully.
Installing package into ‘/home/gilbert/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) Warning message: package ‘DSC2014Tutorial’ is not available (for R version 3.0.2)
請問這是什麼問題呢?
Ubuntu 14.04
R console :
install.packages('DSC2014Tutorial', repo = c('http://taiwanrusergroup.github.io/R', "http://cran.csie.ntu.edu.tw"), type = 'source')
error message:
Warning in install.packages :
unable to resolve 'cran.rstudio.com'
Warning in install.packages :
unable to resolve 'cran.rstudio.com'
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib
Installing package into ‘/home/hsiang/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to resolve 'taiwanrusergroup.github.io'
Warning in install.packages :
unable to resolve 'taiwanrusergroup.github.io'
Warning in install.packages :
unable to access index for repository http://taiwanrusergroup.github.io/R/src/contrib
Warning in install.packages :
unable to resolve 'cran.csie.ntu.edu.tw'
Warning in install.packages :
package ‘DSC2014Tutorial’ is not available (for R version 3.1.2)
ggplot slides page 36
> options(gsubfn.engine='R'); library(sqldf)
Error in library(sqldf) : there is no package called ‘sqldf’
> tmp1 <- sqldf('select Species, Fat, count(*) as Count from siris group by Species, Fat')
Error: could not find function "sqldf"
> tmp2 <- sqldf('select Species, sum(Count) as cnt_by_species from tt group by Species')
Error: could not find function "sqldf"
> sqldf('select tmp1.Species, Fat, Count, (Count*1.0 / cnt_by_species) as Pct
+ from tmp1 join tmp2 on tmp1.Species = tmp2.Species') -> siris_ag
Error: could not find function "sqldf"
> # result not shown to save space
as title
(Visualization/slide2/lecture_ggplot2/index.html#36)
as title
Provide utf-8 encoded file when the locale is utf-8.
Provide big-5 encoded file when the locale is big-5.
Ttop if the locale is not one of them.
抱歉剛剛都在測這個XD
> install.packages('DSC2014Tutorial', repo = 'http://taiwanrusergroup.github.io/R', type = 'source')
Installing package into ‘/home/chihchengliang/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘rpart.plot’ is not available
嘗試 URL 'http://taiwanrusergroup.github.io/R/src/contrib/DSC2014Tutorial_0.3.2.tar.gz'
Content type 'application/octet-stream' length 37991507 bytes (36.2 Mb)
開啟了 URL
==================================================
downloaded 36.2 Mb
ERROR: dependency ‘rpart.plot’ is not available for package ‘DSC2014Tutorial’
* removing ‘/home/chihchengliang/R/x86_64-pc-linux-gnu-library/3.1/DSC2014Tutorial’
Warning in install.packages :
installation of package ‘DSC2014Tutorial’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmphFpKLB/downloaded_packages’
>
修正PAGE 55。請WUSH大大幫忙更新套件~~
如題
ggplot page 36
> library(data.table)
Error in library(data.table) : there is no package called ‘data.table’
> siris_ag <- as.data.table(siris)
Error: could not find function "as.data.table"
> siris_ag <- siris_ag[,list(Count=.N), by='Species,Fat'][
+ ,Pct:=Count/sum(Count), by='Species']
Error in `[.data.frame`(siris_ag, , list(Count = .N), by = "Species,Fat") :
unused argument (by = "Species,Fat")
> # result not shown to save space
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.