May 2018

Travelling Salesman with ggmap

May 10, 2018 | R on datawookie

I’ve been testing out some ideas around the Travelling Salesman Problem using TSP and ggmap. For illustration I’ll find the optimal route between the following addresses:
ADDRESSES <span>=</span> <span>c</span><span>(</span>
  <span>"115 St Andrew's Drive, Durban North, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"1 Evans Road, Glenwood, Berea, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"7 Radar Drive, Durban North, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"25 Gainsborough Drive, Durban North, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"77 Armstrong Avenue, Umhlanga, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"255 Musgrave Road, Berea, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"11 Cassia Road, Reservoir Hills, Durban, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"98 Shepstone Road, Berkshire Downs, New Germany, KwaZulu-Natal, South Africa"</span><span>,</span>
  <span>"12 Finchley Road, Berea West, Westville, KwaZulu-Natal, South Africa"</span>
<span>)</span>
Load up some packages.
<span>library</span><span>(</span>dplyr<span>)</span>
<span>library</span><span>(</span>ggmap<span>)</span>
<span>library</span><span>(</span>gmapsdistance<span>)</span>
<span>library</span><span>(</span>TSP<span>)</span>
Geocoding I added the latitude and longitude for each address using the handy ggmap::mutate_geocode(). ...
[Read more...]

Mimicking SQLDF with MonetDBLite

May 9, 2018 | statcompute

Like many useRs, I am also a big fan of the sqldf package developed by Grothendieck, which uses SQL statement for data frame manipulations with SQLite embedded database as the default back-end. In examples below, I drafted a couple R utility functions with the MonetDBLite back-end by mimicking the sqldf ... [Read more...]

Simple Spatial Modeling – Part 2: Exercises

May 9, 2018 | Hanif Kusuma

In the first exercise of simple spatial modeling here, we learned to create a model that considers more spatial variability. However, it relies on an isolated system where we set the q1 and q6 as zero. In this exercise, we try to bring the model into a more realistic space ... [Read more...]

Topic Modeling and Sentiment Analysis on Tweets

May 9, 2018 | R on Curious Joe

Objective Data collection Discussion of the methodology Data processing Topic modeling using LDA Additional analysis: Sentiment analysis on Rohingya topic Overall finding and discussion Twitter is a popular source for minning social media posts. In this article I harvested tweets that had mention of ‘Bangladesh’, my home country and ran ...
[Read more...]

Rolling Fama French

May 9, 2018 | R Views

In a previous post, we reviewed how to import the Fama French 3-Factor data, wrangle that data, and then regress our portfolio returns on the factors. Please have a look at that previous post, as the following work builds upon it. For more background on Fama French, see the original ...
[Read more...]

Format and Interpret Linear Mixed Models

May 9, 2018 | Dominique Makowski

The data Fit the model The analyze function Summary Print Credits You find it time-consuming to manually format, copy and paste output values to your report or manuscript? That time is over: the psycho package is here for you! The data Let’s take the example dataset included in the ... [Read more...]

In case you missed it: April 2018 roundup

May 9, 2018 | David Smith

In case you missed them, here are some articles from April of particular interest to R users. Microsoft R Open 3.4.4, based on R 3.4.4, is now available. An R script by Ryan Timpe converts a photo into instructions for rendering it as LEGO bricks. R functions to build a random maze ... [Read more...]

Flow charts in R

May 9, 2018 | aghaynes

Flow charts are an important part of a clinical trial report. Making them can be a pain though. One good way to do it seems to be with the grid and Gmisc packages in R. X and Y coordinates can be designated based on the center of the boxes in ...
[Read more...]

10 PRINT mazes with ggplot2

May 8, 2018 | Higher Order Functions

There is a celebrated Commodore 64 program that randomly prints outs / and \ characters and fills the screen with neat-looking maze designs. It is just one line of code, but there is a whole book written about it.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
Screenshots of the 10 PRINT program in action. Images taken from the 10 PRINT book. ...
[Read more...]

PE Industrial Engineer Reference Sheet

May 8, 2018 | R on Thomas Roh

You contribute to the reference sheet here: https://github.com/tomroh/pe_ise_prep. Systems Definition, Analysis, and Design System Analysis and Design Tools Cause-Effect Diagram (Fishbone) Pareto Analysis 80% of the items represent 20% of the sales or 20% of the items represent 80% of the cost. This law is a rule of ...
[Read more...]

Harry Potter and competition results with comperes

May 8, 2018 | QuestionFlow

Exploration of Harry Potter Books Survey results with help of my new comperes package. Prologue About a month ago I decided to add interesting data set to my almost finished (hopefully, soon to be on CRAN) comperes package. Data should represent results of some not ordinary competition. After some thought ... [Read more...]

R Courses in Hamburg

May 8, 2018 | R on The Jumping Rivers Blog

Introduction to R - 13th Mastering the Tidyverse - 14th Next Steps in the Tidyverse - 15th Automated Reporting (First Steps Towards Shiny) - 20th Interactive Graphics with Shiny - 21st Predictive Analytics - 27/28th Big news, from the 13th til the...
[Read more...]

Open-Source Machine Learning in Azure

May 8, 2018 | David Smith

The topic for my talk at the Microsoft Build conference yesterday was "Migrating Existing Open Source Machine Learning to Azure". The idea behind the talk was to show how you can take the open-source tools and workflows you already use for machine learning and data science, and easily transition them ... [Read more...]

R and SurveyGizmo API update

May 8, 2018 | Jonathan

I made a public fork of the original RSurveyGizmo package to accommodate the API Secret, as the original package sometimes errored out with authentication issues. The post R and SurveyGizmo API update appeared first on Jonathan Fowler. [Read more...]

An overview of R with a curated learning path

May 7, 2018 | Roger Huang

I recently wrote a 80-page guide to how to get a programming job without a degree, curated from my experience helping students do just that at Springboard, a leading data science bootcamp. This excerpt is a part where I focus on an overview of the R programming language. Description: R ... [Read more...]
1 10 11 12 13 14 16

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)