November 2016

5 Ways to Subset a Data Frame in R

November 29, 2016 | Douglas E Rice

Often, when you’re working with a large data set, you will only be interested in a small portion of it for your particular analysis. So, how do you sort through all the extraneous variables and observations and extract only those you need? Well, R has several ways of doing ...
[Read more...]

Nesting Functions in R with the Piping Operator

November 29, 2016 | Douglas E Rice

One of the most useful (and most popular) applications in R are the functions available in the dplyr package. With functions like select, filter, arrange, and mutate, you can restructure a data set to get it looking just the way you want it. The problem is that doing so can ...
[Read more...]

Repeated measures ANOVA in R Exercises

November 29, 2016 | Sammy Ngugi

One way, two way and n way ANOVA are used to test difference in means when we have one, two and n factor variables. A key assumption when performing these ANOVAs is that the measurements are independent. When we have repeated measures this assumption is violated, so we have to ... [Read more...]

A new `subprocess` package for R

November 29, 2016 | Lukasz

Here’s a new package that brings to R new API to handle child processes – similar to how Python handles them. Unlike the already available system() and system2() calls from the base package or the mclapply() function from the parallel package, this new API is aimed at handling long-lived child ... [Read more...]

Seasonal Analysis in EGRET

November 28, 2016 | The USGS OWI blog

Introduction This document describes how to obtain seasonal information from the R package EGRET - Exploration and Graphics for RivEr Trends: An R-package for the analysis of long-term changes in water quality and streamflow, including the water-quality method Weighted Regressions on Time, Discharge, and Season (WRTDS) For example, we might ...
[Read more...]

elasticsearchr – a Lightweight Elasticsearch Client for R

November 28, 2016 | alexioannides

elasticsearchr: a Lightweight Elasticsearch Client for R Elasticsearch is a distributed NoSQL document store search-engine and column-oriented database, whose fast (near real-time) reads and powerful aggregation engine make it an excellent choice as an ‘analytics database’ for R&D, production-use or … Continue reading →
[Read more...]

Data frame exercises Vol. 2

November 28, 2016 | Maria Elisa Bertinat Tulipano

[In the exercises below we cover the basics of data frames.] Answers to the exercises are available here. Exercise 1 Consider two vectors: x=seq(1,43,along.with=Id) y=seq(-20,0,along.with=Id) Create a data.frame df: __df Id Letter x y 1 1 a 1.000000 -20.000000 2 1 b 4.818182 -18.181818 3 1 c 8.636364 -16.363636 4 2 a 12.454545 ... [Read more...]

A heat map of Divvy bike riders in Chicago

November 28, 2016 | David Smith

Chicago's a great city for a bike-sharing service. It's pretty flat, and there are lots of wide roads with cycle lanes. I love Divvy and use it all the time. Not so much in the winter though: it gets very cold here. Nonetheless, this heat map of Divvy riders, created ... [Read more...]

Simulation in R For AP Statistics

November 28, 2016 | Kevin

Make a simulation and function using R. I continue to teach some R programming in my AP Stats class because this is an essential skill for them to have. We are now in chapter five of our textbook, Probability and Simulation. I had my students review the parking problem on ... [Read more...]

Simple Anagram Finder Using R

November 27, 2016 | John

One of my early programming projects in Python was a word game solver (example: word jumble solver) – the early version was a simple script, which grew [...] The post Simple Anagram Finder Using R appeared first on ProgrammingR. [Read more...]

More about Flexible Frequency Models

November 27, 2016 | statcompute

Modeling the frequency is one of the most important aspects in operational risk models. In the previous post (https://statcompute.wordpress.com/2016/05/13/more-flexible-approaches-to-model-frequency), the importance of flexible modeling approaches for both under-dispersion and over-dispersion has been discussed. In addition to the quasi-poisson regression, three flexible frequency modeling techniques, including generalized ... [Read more...]

anytime 0.1.1: More robust

November 27, 2016 | Thinking inside the box

CRAN just accepted the newest release 0.1.1 of anytime, following the previous five releases since September. anytime is a very focussed package aiming to do just one thing really well: to convert anything in integer, numeric, character, factor, ordered, ... format to POSIXct (or Date) objects -- and to do so without ... [Read more...]

String Manipulation – Exercises

November 27, 2016 | Miodrag Sljukic

In this set of exercises we will practice functions that enable us to manipulate strings.You can find more about string manipulation functions in Handling and Processing Strings in R e-book. Answers to the exercises are available here. If you have different solution, feel free to post it. Exercise 1 Load ... [Read more...]

Basic Shiny Application

November 27, 2016 | Steffen

In this article I will describe how I built a basic web application with R and Shiny. Shiny is a web application framework for R and can be used to build and deploy interactive...
[Read more...]
1 2 3 4 15

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)