Category: r

  • Fertility Rate on European Countries with R

    This is the source from https://notebooks.azure.com/ignatandrei/libraries/EuropeStatData – FertitlityRate Preload packages¶ Pacman¶ First install pacman to install once In [1]: if (!require("pacman")) install.packages("pacman") Loading required package: pacman Load the necessary packages¶ In [2]: pacman::p_load(‘XML’, "magrittr","ggplot2", "RCurl", "rlist", "rvest", "dplyr", "devtools","assertthat","XLConnect","tidyr") Use the functions in the packages¶ In [3]: library(stringr) library(magrittr) library(XML) library(RCurl) library(rlist) library(ggplot2) library(rvest) library(tidyr)…

  • Download large files with R and RCurl

    First,read documentation. Try with #getCurlOptionTypes(opts = getCurlOptionsConstants()) #print (getCurlOptionTypes) #listCurlOptions() #getCurlOptionsConstants() #getCurlOptionTypes(opts = getCurlOptionsConstants()) Then,this is the code ( pretty self explanatory) downloadFile <-function(url,file){      curl = getCurlHandle() curlSetOpt( .opts = list(http.version =HTTP_VERSION_1_0,verbose = TRUE),                curl = curl)          f = CFILE(file,mode=”wb”)     a = curlPerform(url = url,curl=curl,writedata = f@ref,noprogress=FALSE)     close(f) }

  • Making IsThisTaxiLegal–evolving from Proof of Concept

    What we need first is automating some tasks – like downloading the authorizations pdf ( and parsing after) from http://www.pmb.ro/adrese_utile/transport_urban/autorizatii_taxi/autorizatii_TAXI.php . For this I want to use R – because C# I know already and is a good occasion to learn R. The file is on https://github.com/ignatandrei/IsThisTaxiLegal/blob/master/applications/RDownloadFile/Script.R  Some ideas from here from a C# developer:…

  • Pivot / Transform rows from one column into multiple columns with R in SqlServer

    Let’s say we have a table  [CurrencyValues] with the following datas CurrencyID CurrencyValue ValueDate CAD 2.9929 9/27/2016 0:00 EUR 4.4495 9/27/2016 0:00 GBP 5.1205 9/27/2016 0:00 USD 3.9567 9/27/2016 0:00 CAD 3.0006 9/26/2016 0:00 EUR 4.4504 9/26/2016 0:00 GBP 5.1213 9/26/2016 0:00 USD 3.9589 9/26/2016 0:00 CAD 3.0397 9/23/2016 0:00 EUR 4.447 9/23/2016 0:00 We…

  • Forecasting EUR–BNR currency exchange

    Part 1: Starting with R – installation : http://msprogrammer.serviciipeweb.ro/2016/10/03/starting-with-r-as-in-sqlserver-r-server-and-vs-package/ Part 2: Starting with R – language and data http://msprogrammer.serviciipeweb.ro/2016/10/10/starting-with-r-language-and-data/ Part 3: Starting with R – basic and statistics http://msprogrammer.serviciipeweb.ro/2016/10/17/starting-with-r-basic-and-statistics/ Part 4: Making diagrams with R ( and transformation of data) : http://msprogrammer.serviciipeweb.ro/2016/10/31/making-diagrams-with-r/ Part 5:  Forecasting currency exchange with R   http://msprogrammer.serviciipeweb.ro/2016/11/06/forecasting-eurbnr-currency-exchange/ Let’s suppose that we have…

  • Making diagrams with R

    Part 1: Starting with R – installation : http://msprogrammer.serviciipeweb.ro/2016/10/03/starting-with-r-as-in-sqlserver-r-server-and-vs-package/ Part 2: Starting with R – language and data http://msprogrammer.serviciipeweb.ro/2016/10/10/starting-with-r-language-and-data/ Part 3: Starting with R – basic and statistics http://msprogrammer.serviciipeweb.ro/2016/10/17/starting-with-r-basic-and-statistics/ Part 4: Making diagrams with R ( and transformation of data) : http://msprogrammer.serviciipeweb.ro/2016/10/31/making-diagrams-with-r/ Part 5:  Forecasting currency exchange with R   http://msprogrammer.serviciipeweb.ro/2016/11/06/forecasting-eurbnr-currency-exchange/ I have a site that…

  • Starting with R- basic and statistics

    Part 1: Starting with R – installation : http://msprogrammer.serviciipeweb.ro/2016/10/03/starting-with-r-as-in-sqlserver-r-server-and-vs-package/ Part 2: Starting with R – language and data http://msprogrammer.serviciipeweb.ro/2016/10/10/starting-with-r-language-and-data/ Part 3: Starting with R – basic and statistics http://msprogrammer.serviciipeweb.ro/2016/10/17/starting-with-r-basic-and-statistics/ Part 4: Making diagrams with R ( and transformation of data) : http://msprogrammer.serviciipeweb.ro/2016/10/31/making-diagrams-with-r/ Part 5:  Forecasting currency exchange with R   http://msprogrammer.serviciipeweb.ro/2016/11/06/forecasting-eurbnr-currency-exchange/ Read http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.723.6582&rep=rep1&type=pdf  ‘Learning Statistics with R:…

  • Starting with R – language and data

    Part 1: Starting with R – installation : http://msprogrammer.serviciipeweb.ro/2016/10/03/starting-with-r-as-in-sqlserver-r-server-and-vs-package/ Part 2: Starting with R – language and data http://msprogrammer.serviciipeweb.ro/2016/10/10/starting-with-r-language-and-data/ Part 3: Starting with R – basic and statistics http://msprogrammer.serviciipeweb.ro/2016/10/17/starting-with-r-basic-and-statistics/ Part 4: Making diagrams with R ( and transformation of data) : http://msprogrammer.serviciipeweb.ro/2016/10/31/making-diagrams-with-r/ Part 5:  Forecasting currency exchange with R   http://msprogrammer.serviciipeweb.ro/2016/11/06/forecasting-eurbnr-currency-exchange/ The http://tryr.codeschool.com/ also features a…

  • Starting with R (as in SqlServer R server and VS package)

    Part 1: Starting with R – installation : http://msprogrammer.serviciipeweb.ro/2016/10/03/starting-with-r-as-in-sqlserver-r-server-and-vs-package/ Part 2: Starting with R – language and data http://msprogrammer.serviciipeweb.ro/2016/10/10/starting-with-r-language-and-data/ Part 3: Starting with R – basic and statistics http://msprogrammer.serviciipeweb.ro/2016/10/17/starting-with-r-basic-and-statistics/ Part 4: Making diagrams with R ( and transformation of data) : http://msprogrammer.serviciipeweb.ro/2016/10/31/making-diagrams-with-r/ Part 5:  Forecasting currency exchange with R   http://msprogrammer.serviciipeweb.ro/2016/11/06/forecasting-eurbnr-currency-exchange/ First,start with installing Sql Server…