January 2013

Introducing the BH package

January 31, 2013 | Thinking inside the box

Earlier today a new package BH arrived on CRAN. Over the years, Jay Emerson, Michael Kane and I had numerous discussions about a basic Boost infrastructure package providing Boost headers for other CRAN packages (and yes, we are talking packages usin... [Read more...]

Flowchart: How to learn survey analysis with R

January 31, 2013 | David Smith

In a recent talk to the DC R User Group, Anthony Damico presented the following handy flowchart for learning to do survey analysis with R (actually, it's a pretty good flowchart for learning R for any application): Since they're not clickable above, here are the resource links: Learn R by ... [Read more...]

Data analysis approaches to modeling changes in primary metabolism

January 31, 2013 | dgrapov

[This article was first published on imDEV » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. View this document on Scribd To leave a comment for the author, please follow the link and comment on their blog: imDEV » R. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. [Read more...]

Taking Expectations to the Next Level

January 31, 2013 | Jacob Simmering

Higher Expectations I came across this post on Thursday and found it to be quite interesting. Clearly rental prices vary according to where you live. That isn't too surprising. I started thinking a bit more about it and thought that Boston and the nearby communities would have to have some ... [Read more...]

Using R: writing a table with odd lines (again)

January 31, 2013 | mrtnj

Let’s look at my gff track headers again. Why not do it with plyr instead? d_ply splits the data frame by the feature column and applies a nameless function that writes subsets to the file (and returns nothing, hence the ”_” in the name). This isn’t shorter or ... [Read more...]

Using Line Segments to Compare Values in R

January 31, 2013 | Mollie

Sometimes you want to create a graph that will allow the viewer to see in one glance:The original value of a variableThe new value of the variableThe change between old and newOne method I like to use to do this is using geom_segment and geom_poin... [Read more...]

Scatterplot Matrices

January 31, 2013 | moonheadsing

Scatterplot matrices are a great way to roughly determine if you have a linear correlation between multiple variables. This is particularly helpful in pinpointing specific variables that might have similar correlations to your genomic or proteomic data. If you already have data with multiple variables, load it up as described ... [Read more...]

How to install packages on R + screenshots

January 31, 2013 | moonheadsing

Have no fear, the screenshots are here! (For the original tutorial, click here) Method 1 (less typing) Part 1-Getting the Package onto Your Computer Open R via  your preferred method (icon on desktop, Start Menu, dock, etc.) Click “Packages” in the top menu then click “Install package(s)”.  Choose a mirror ... [Read more...]

Soup up your R environment: how to install packages

January 31, 2013 | moonheadsing

Today we are going to make additions to our R environment in a common process called installing packages. The transition won’t be as long, drastic nor emotional as an episode of Extreme Makeover: Home Edition, but it does add on more capabilities to your R environment. A package is ... [Read more...]

Sorting Numeric Vectors in C++ and R

January 31, 2013 | Rcpp Gallery

Consider the problem to sort all elements of the given vector in ascending order. We can simply use the function std::sort from the C++ STL.
<span>#include <Rcpp.h></span>
<span>using</span> <span>namespace</span> <span>Rcpp</span><span>;</span>

<span>// [[Rcpp::export]]</span>
<span>NumericVector</span> <span>stl_sort</span><span>(</span><span>NumericVector</span> <span>x</span><span>)</span> <span>{</span>
   <span>NumericVector</span> <span>y</span> <span>=</span> <span>clone</span><span>(</span><span>x</span><span>);</span>
   <span>std</span><span>::</span><span>sort</span><span>(</span><span>y</span><span>.</span><span>begin</span><span>(),</span> <span>y</span><span>.</span><span>end</span><span>());</span>
   <span>return</span> <span>y</span><span>;</span>
z <span><-</span> rnorm<span>(</span><span>100000</span><span>)</span>
x <span><-</span> rnorm<span>(</span><span>100</span><span>)</span>

<span># check that stl_sort is the same as sort</span>
stopifnot<span>(</span>all.equal<span>(</span>stl_sort<span>(</span>x<span>),</span> sort<span>(</span>x<span>)))</span>

<span># benchmark stl_sort and sort</span>
benchmark<span>(</span>stl_sort<span>(</span>z<span>),</span> sort<span>(</span>z<span>),</span> order<span>=</span><span>"relative"</span><span>)[,</span><span>1</span><span>:</span><span>4</span><span>]</span>
test replications elapsed relative 1 stl_sort(z) 100 0.632 1.000 2 sort(z) 100 1.164 1.842 Consider the problem of sorting the first n elements of a given vector. ...
[Read more...]

Using Boost via the new BH package

January 31, 2013 | Rcpp Gallery

Earlier today the new BH package arrived on CRAN. Over the years, Jay Emerson, Michael Kane and I had numerous discussions about a basic Boost infrastructure package providing Boost headers for other CRAN packages. JJ and Romain chipped in as well, and Jay finally took the lead by first creating ...
[Read more...]

R installation + screenshots

January 30, 2013 | moonheadsing

Feeling faint of heart without photos depicting what to do? No worries, here they are. Go to the R website and click “Download R” under “Getting Started” Choose a place to download R. Even though we’re on the limitless and borderless interweb, choosing a location close to you helps ... [Read more...]

R users: Be counted in Rexer’s 2013 Data Miner Survey

January 30, 2013 | David Smith

Since 2007, Rexer Analytics has been conducting periodic surveys to measure the analytic behaviors, views and preferences of data miners and analytic professionals. In the last survey, conducted in 2011, more than 1300 analysts shared information about the data analysis software packages they use. (The results of all Rexer surveys are available free ... [Read more...]


January 30, 2013 | Thinking inside the box

A new Armadillo version 3.6.2 came out yesterday, and the corresponding RcppArmadillo version is now on CRAN. Changes are mostky incremental: Changes in RcppArmadillo version (2013-01-29) Upgraded to Armadillo release Version 3.6.2 ... [Read more...]

Maximize Your Expectations!

January 30, 2013 | Jacob Simmering

A Problem A major problem in secondary data analysis is that you didn't get to decide what data was collected. Lets say you were interested in how many times a student has read the Twilight books). Specifically, you want to know how effective the ads for the movies and books ... [Read more...]

R finals

January 30, 2013 | xi'an

On the morning I returned from Varanasi and the ISBA meeting there, I had to give my R final exam (along with three of my colleagues in Paris-Dauphine). This year, the R course was completely in English, exam included, which means I can post it here as it may attract ... [Read more...]

Modeling Residential Electricity Usage with R

January 30, 2013 | Lloyd Spencer

Wow, I can’t believe it has been 11 months since my last blog posting!  The next series of postings will be related to the retail energy field.  Residential power usage is satisfying to model as it can be forecast fairly accurately with the right inputs.  Partly as a consequence of ... [Read more...]
1 2 3 18

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)