March 2019

Network Analysis of Emotions

March 17, 2019 | R on Will Hipson

In this month’s post, I set out to create a visual network of emotions. Emotion Dynamics tells us that different emotions are highly interconnected, such that one emotion morphs into another and so on. I’ll be using a large dataset from an original study published in PLOS ONE ...
[Read more...]

drake transformed

March 17, 2019 | rOpenSci - open tools for open science

Version 7.0.0 of drake just arrived on CRAN, and it is faster and easier to use than previous releases. install.packages("drake") Recap Data analysis can be slow. A round of scientific computation can take several minutes, hours, or even days to complete. After it finishes, if you update your code ... [Read more...]

Access the free economic database DBnomics with R

March 17, 2019 | Thomas Brand

DBnomics : the world’s economic database Explore all the economic data from different providers (national and international statistical institutes, central banks, etc.), for free, following the link db.nomics.world. You can also retrieve all the economic data through the rdbnomics package here. This blog post describes the different ways ...
[Read more...]

RQuantLib 0.4.8: Small updates

March 17, 2019 | Thinking inside the box

A new version 0.4.8 of RQuantLib reached CRAN and Debian. This release was triggered by a CRAN request for an update to the configure.ac script which was easy enough (and which, as it happens, did not result in changes in the configure script produce... [Read more...]

Rcpp 1.0.1: Updates

March 17, 2019 | Thinking inside the box

Following up on the 10th anniversary and the 1.0.0. release, we excited to share the news of the first update release 1.0.1 of Rcpp. package turned ten on Monday—and we used to opportunity to mark the current version as 1.0.0! It arrived at CRAN ov... [Read more...]

Tipster Season

March 16, 2019 | Analysis of AFL

So it is approaching AFL mens season, which means that soon everyones twitter feed, Facebook and emails will get clogged up with various tipsters. People saying they have won at 60% of the time over last season and therefor you should pay them money and follow their tips! But how can ...
[Read more...]

wrapr::let()

March 16, 2019 | John Mount

I would like to once again recommend our readers to our note on wrapr::let(), an R function that can help you eliminate many problematic NSE (non-standard evaluation) interfaces (and their associate problems) from your R programming tasks. The idea is to imitate the following lambda-calculus idea: let x be ... [Read more...]

Version 0.7.1 of NIMBLE released

March 15, 2019 | Chris Paciorek

We’ve released the newest version of NIMBLE on CRAN and on our website. NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC). Version 0.7.1 is primarily a maintenance release with a couple important bug ...
[Read more...]

littler 0.3.7: Small tweaks

March 15, 2019 | Thinking inside the box

The eight release of littler as a CRAN package is now available, following in the thirteen-ish year history as a package started by Jeff in 2006, and joined by me a few weeks later. littler is the first command-line interface for R and predates Rscript. And it is (in my very ... [Read more...]

Why does R drop attributes when subsetting?

March 15, 2019 | R on Jorge Cimentada

I had to spend about 1 hour yesterday because R did something completely unpredictable (for my taste). It dropped an attribute without a warning.
df <- data.frame(x = rep(c(1, 2), 20))

attr(df$x, "label") <- "This is clearly a label"

df$x
##  [1] 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
## [36] 2 1 2 1 2
## attr(,"label")
## [1] "This is clearly a label"
The label is clearly there. To my surprise, if I subset this data frame, R drops the attribute.
new_df <- df[df$x == 2, , drop = FALSE]

new_df$x
##  [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
It doesn’t matter if ... [Read more...]

Saving missing categories from R to Stata

March 15, 2019 | R on Jorge Cimentada

I’m finishing a project from the RECSM institute where we developed a Shiny application to download data from the European Social Survey with Spanish translated labels. This was one hell of a project since I had to build some wrappers around the Google Translate API to generate translations for ...
[Read more...]

Scraping old player data

March 15, 2019 | Analysis of AFL

As its been pointed out to me on that it would be handy if within fitzRoy that it should contain past players data from footywire. So here is roughly how to do that. Step 1 - get all the packages you need
library(rvest)
## Loading required package: xml2
library(tidyverse)
## ── Attaching packages ──────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.0       ✔ purrr   0.3.0  
## ✔ tibble  2.0.1       ✔ dplyr   0.8.0.1
## ✔ tidyr   0.8.3       ✔ stringr 1.4.0  
## ✔ readr   1.3.1       ✔ forcats 0.4.0
## ── Conflicts ─────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter()         masks stats::filter()
## ✖ readr::guess_encoding() masks rvest::guess_encoding()
## ✖ dplyr::lag()            masks stats::lag()
## ✖ purrr::pluck()          masks rvest::pluck()
library(naniar)
naniar isn’...
[Read more...]

Software Dependencies and Risk

March 15, 2019 | John Mount

Dirk Eddelbuettel just shared an important point on software and analyses: dependencies are hard to manage risks. If your software or research depends on many complex and changing packages, you have no way to establish your work is correct. This is because to establish the correctness of your work, you ...
[Read more...]
1 6 7 8 9 10 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)