Support for Microsoft version of R, new stuff worth checking, Data Mining GUI for those intimidated by R code: http://togaware.com/rattle-5-0-0-alpha-released/
Install: install.packages("rattle", repos="http://rattle.togaware.com")
piątek, 16 grudnia 2016
wtorek, 13 grudnia 2016
Excel: Rank if with sumproduct (and VBA)
Look here: http://www.mrexcel.com/forum/excel-questions/82479-rank-if-2.html
eg.
=SUMPRODUCT(--(A$3:A$11=A3)*(B3<B$3:B$11))+1
Big thanks. Helped me a lot today.
eg.
=SUMPRODUCT(--(A$3:A$11=A3)*(B3<B$3:B$11))+1
Big thanks. Helped me a lot today.
poniedziałek, 28 listopada 2016
Music from my dream...
Ives: The Unanswered Question / Premil Petrovic / No Borders Orchestra Similar:
piątek, 25 listopada 2016
Marketing with R, very interesting articles.
My search started with the question, how to reduce the huge amount of information about the history of purchases, contacts of hundred thousands of customers to manageable few variables.
I came across Recency, Frequency, Monetary value (RFM) analysis.
I came across Recency, Frequency, Monetary value (RFM) analysis.
Review articles of these users on R bloggers.
https://www.r-bloggers.com/ author/jack-han/
https://www.r-bloggers.com/ author/analyze-core-r- language/
https://www.r-bloggers.com/
https://www.r-bloggers.com/
piątek, 4 listopada 2016
Cleaning data with Regex in Excel (then in R)...
I have a dirty column that should contain duration in months as integer, but it contains variants of strings: due to end on dd-mm-yy, duration x days, from dd.mm.yyyy through/to dd.mm.yyyy y.
Headache.
This is the day I started playing with regex.
First, how to find a date after a specific word:
http://stackoverflow.com/questions/19193251/regex-to-get-the-words-after-matching-string
After some reading (eg. http://stackoverflow.com/questions/18139493/finding-first-word-after-regex-match, http://stackoverflow.com/questions/546220/how-to-match-the-first-word-after-an-expression-with-regex
modifications and experimentations I reached the following compact solution:
[\n\r].*[skończy się:|until:|do:|zakończenia:]\s*(\w+.\w+.\w+)
Tested with: "The contract will last until: dd.mm.yyy or to the [...]" it will return just the date "dd.mm.yyy
Cute!
Macros, that work with Excel:
http://analystcave.com/excel-regex-tutorial/ (I used RegexExecute macro with success)
http://www.vbaexpress.com/kb/getarticle.php?kb_id=841
http://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops
http://www.vbaexpress.com/kb/getarticle.php?kb_id=841
http://superuser.com/questions/978532/how-do-i-use-regex-using-instr-in-vba
http://stackoverflow.com/questions/19481175/general-purpose-udfs-for-using-regular-expressions-in-excel (set of very useful tools)
R code to test:
http://stackoverflow.com/questions/34804708/matching-a-word-after-another-word-in-r-regex
https://renkun.me/blog/2014/02/20/extract-information-from-texts-with-regular-expressions-in-r.html
In R the following worked with me:
library(stringr)
str_extract(string=df$duration, pattern= "(?<=(dnia:|zakończenia:|until:)\\s)(\\w+.\\w+.\\w+)" )
Headache.
This is the day I started playing with regex.
First, how to find a date after a specific word:
http://stackoverflow.com/questions/19193251/regex-to-get-the-words-after-matching-string
After some reading (eg. http://stackoverflow.com/questions/18139493/finding-first-word-after-regex-match, http://stackoverflow.com/questions/546220/how-to-match-the-first-word-after-an-expression-with-regex
modifications and experimentations I reached the following compact solution:
[\n\r].*[skończy się:|until:|do:|zakończenia:]\s*(\w+.\w+.\w+)
Tested with: "The contract will last until: dd.mm.yyy or to the [...]" it will return just the date "dd.mm.yyy
Cute!
Macros, that work with Excel:
http://analystcave.com/excel-regex-tutorial/ (I used RegexExecute macro with success)
http://www.vbaexpress.com/kb/getarticle.php?kb_id=841
http://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops
http://www.vbaexpress.com/kb/getarticle.php?kb_id=841
http://superuser.com/questions/978532/how-do-i-use-regex-using-instr-in-vba
http://stackoverflow.com/questions/19481175/general-purpose-udfs-for-using-regular-expressions-in-excel (set of very useful tools)
R code to test:
http://stackoverflow.com/questions/34804708/matching-a-word-after-another-word-in-r-regex
https://renkun.me/blog/2014/02/20/extract-information-from-texts-with-regular-expressions-in-r.html
In R the following worked with me:
library(stringr)
str_extract(string=df$duration, pattern= "(?<=(dnia:|zakończenia:|until:)\\s)(\\w+.\\w+.\\w+)" )
poniedziałek, 24 października 2016
ReadingList: Data Bases in R
1. Data Table by Matt Dowle.
Cheatsheet: https://s3.amazonaws.com/assets.datacamp.com/img/blog/data+table+cheat+sheet.pdf
https://www.analyticsvidhya.com/blog/2016/05/data-table-data-frame-work-large-data-sets/
Basics: https://www.dezyre.com/data-science-in-r-programming-tutorial/r-data-table-tutorial
https://www.r-bloggers.com/a-data-table-r-tutorial-by-datacamp-intro-to-dti-j-by/
https://www.r-bloggers.com/elegant-fast-data-manipulation-with-data-table/
Adv: https://www.r-bloggers.com/advanced-tips-and-tricks-with-data-table/
https://www.r-bloggers.com/efficient-aggregation-and-more-using-data-table/
Quick union: https://www.r-bloggers.com/r-quick-tip-collapse-a-lists-of-data-frames-with-data-table/
Aggregation: https://www.r-bloggers.com/two-of-my-favorite-data-table-features/
Binning: https://www.r-bloggers.com/using-data-table-for-binning/
Joining: http://www.magesblog.com/2014/06/the-joy-of-joining-datatables.html#more
Manipulation the fast way: http://www.magesblog.com/2012/11/datatable-rocks-data-manipulation-fast.html#more
Solving common problems: https://www.r-bloggers.com/solve-common-r-problems-efficiently-with-data-table/
Matt Dowle presentations:
http://datascience.la/matt-dowles-data-table-talk-from-user-2014/
Roll:
https://www.r-bloggers.com/understanding-data-table-rolling-joins/
https://www.r-bloggers.com/advanced-tips-and-tricks-with-data-table/
All articles:
https://github.com/Rdatatable/data.table/wiki/Articles
H2O data table?
http://t.co/TYGG6KcMpx
https://www.analyticsvidhya.com/blog/2016/05/h2o-data-table-build-models-large-data-sets/
2. Dplyr by Hadley Wickham... plenty of stuff everywhere (to be elaborated on)
Cheatsheet: https://s3.amazonaws.com/assets.datacamp.com/img/blog/data+table+cheat+sheet.pdf
https://www.analyticsvidhya.com/blog/2016/05/data-table-data-frame-work-large-data-sets/
Basics: https://www.dezyre.com/data-science-in-r-programming-tutorial/r-data-table-tutorial
https://www.r-bloggers.com/a-data-table-r-tutorial-by-datacamp-intro-to-dti-j-by/
https://www.r-bloggers.com/elegant-fast-data-manipulation-with-data-table/
Adv: https://www.r-bloggers.com/advanced-tips-and-tricks-with-data-table/
https://www.r-bloggers.com/efficient-aggregation-and-more-using-data-table/
Quick union: https://www.r-bloggers.com/r-quick-tip-collapse-a-lists-of-data-frames-with-data-table/
Aggregation: https://www.r-bloggers.com/two-of-my-favorite-data-table-features/
Binning: https://www.r-bloggers.com/using-data-table-for-binning/
Joining: http://www.magesblog.com/2014/06/the-joy-of-joining-datatables.html#more
Manipulation the fast way: http://www.magesblog.com/2012/11/datatable-rocks-data-manipulation-fast.html#more
Solving common problems: https://www.r-bloggers.com/solve-common-r-problems-efficiently-with-data-table/
Matt Dowle presentations:
http://datascience.la/matt-dowles-data-table-talk-from-user-2014/
Roll:
https://www.r-bloggers.com/understanding-data-table-rolling-joins/
https://www.r-bloggers.com/advanced-tips-and-tricks-with-data-table/
All articles:
https://github.com/Rdatatable/data.table/wiki/Articles
H2O data table?
http://t.co/TYGG6KcMpx
https://www.analyticsvidhya.com/blog/2016/05/h2o-data-table-build-models-large-data-sets/
2. Dplyr by Hadley Wickham... plenty of stuff everywhere (to be elaborated on)
piątek, 21 października 2016
Free books from Gitbook... R stuff.
General:
Przewodnik po pakiecie, Przemysław Biecek https://pbiecek.gitbooks.io/przewodnik/content/
R for Data Science, Garrett Grolemund Hadley Wickham http://r4ds.had.co.nz/Programming:
Efficient R programming, Colin Gillespie, Robin Lovelace https://csgillespie.github.io/efficientR/
Advanced R by Hadley Wickham http://adv-r.had.co.nz/
Time series:Analiza i prognozowanie szeregów czasowych – case studies Część I , Adam Zagdański, Artur Suchwałko http://quantup.pl/szeregi-czasowe-case-studies/
Visual analysis:
Geostatystyka w R, Jakub Nowosad (see also presentations pazuR https://nowosad.github.io/presentations/)https://bookdown.org/nowosad/Geostatystyka/eksploracyjna-analiza-danych-przestrzennych.html
Not compiled files for Ggplot2 book by Hadley Wickham: https://github.com/hadley/ggplot2-book
R for Excel users
http://quantup.pl/operacje-w-R-znane-z-Excela/
http://quantup.pl/wykresy-w-R-znane-z-Excela/
Report writing:
Not compiled files for Ggplot2 book by Hadley Wickham: https://github.com/hadley/ggplot2-book
R for Excel users
http://quantup.pl/operacje-w-R-znane-z-Excela/
http://quantup.pl/wykresy-w-R-znane-z-Excela/
Report writing:
Authoring Books with R Markdown, Yihui Xiehttps://bookdown.org/yihui/bookdown/
Data mining:
The caret Package, Max Kuhn http://topepo.github.io/caret/index.html
Data mining:
The caret Package, Max Kuhn http://topepo.github.io/caret/index.html
Python
PythonPython Data Science Handbook
Jake VanderPlas Soon to be published: https://github.com/jakevdp/PythonDataScienceHandbook/blob/master/README.md
Subskrybuj:
Posty (Atom)