July 2016

Timezone conversion in R

July 25, 2016 | Leo Li

Timezone conversion is a common practice in real world and the simplest way is to utilize build-in functions in R rather than design your owns functions to take care of the hour offset, especially in Read More ... [Read more...]

Read a lot of datasets at once with R

July 25, 2016 | Econometrics and Free Software

I often have to read a lot of datasets at once using R. So I’ve wrote the following function to solve this issue:
read_list <- function(list_of_datasets, read_func){

        read_and_assign <- function(dataset, read_func){
                dataset_name <- as.name(dataset)
                dataset_name <- read_func(dataset)
        }

        # invisible is used to suppress the unneeded output
        output <- invisible(
                sapply(list_of_datasets,
                           read_and_assign, read_func = read_func, simplify = FALSE, USE.NAMES = TRUE))

        # Remove the extension at the end of the data set names
        names_of_datasets <- c(unlist(strsplit(list_of_datasets, "[.]"))[c(T, F)])
        names(output) <- names_of_datasets
        return(output)
}
You need to supply a list of datasets as well as the function to read the datasets to read_list. So for example to read ... [Read more...]

RcppHoney Introduction

July 25, 2016 | Rcpp Gallery

Rationale In C++ we often have containers that are not compatible with R or Rcpp with data already in them (std::vector, std::set, etc.). One would like to be able to operate on these containers without having to copy them into Rcpp structures like I...
[Read more...]

Read a lot of datasets at once with R

July 25, 2016 | Bruno Rodrigues

I often have to read a lot of datasets at once using R. So I’ve wrote the following function to solve this issue:
read_list <- function(list_of_datasets, read_func){

        read_and_assign <- function(dataset, read_func){
                dataset_name <- as.name(dataset)
                dataset_name <- read_func(dataset)
        }

        # invisible is used to suppress the unneeded output
        output <- invisible(
                sapply(list_of_datasets,
                           read_and_assign, read_func = read_func, simplify = FALSE, USE.NAMES = TRUE))

        # Remove the extension at the end of the data set names
        names_of_datasets <- c(unlist(strsplit(list_of_datasets, "[.]"))[c(T, F)])
        names(output) <- names_of_datasets
        return(output)
}
You need to supply a list of datasets as well as the function to read the datasets to read_list. So for example to read ... [Read more...]

Microsoft R Open 3.3.0 now available

July 25, 2016 | David Smith

Microsoft R Open 3.3.0, the enhanced distribution of open source R, is now available for download for Windows, Mac and Linux systems. This release includes a significant updates to the R language engine from the R Core Group bundled with the multithreaded performance and CRAN package time-machine capabilities of Microsoft R ... [Read more...]

Showing code changes when teaching

July 25, 2016 | Robin Wilson

A key – but challenging – part of learning to program is moving from writing technically-correct code “that works” to writing high-quality code that is sensibly decomposed into functions, generically-applicable and generally “good”. Indeed, you could say that this is exactly what Software Carpentry is about – taking you from someone bodging together ... [Read more...]

Economy and dynamic modelling: Haavelmo’s approach

July 25, 2016 | msuzen

Updated on 25 August 2017Preamable: Predictions using dynamic modellingMachine Learning and  Neural Networks are not the only way to do data science or AI. There are other techniques to explore  , for example, from quantitative economics. Apart from Game Theory, dynamic modelling could be suitable to many prediction problems, specially the ones ... [Read more...]

Economy and dynamic modelling: Haavelmo’s approach

July 25, 2016 | msuzen

Econometrics aims at estimating observables in the economy and their inter-dependencies and testing the estimates against the economic reality. A quantitative approach to express these inter-dependencies appear as simultaneous equations, an i.e. system of linear equations, this is  a mathematical structure of economic relationships that were made possible with ... [Read more...]

The collaborative innovation landscape in data science

July 24, 2016 | Murtaza Haider

Computing platforms should be like Lego. That is, they should provide the fundamental building blocks and enable the users' imagination to innovate. The latest issue of Stata Journal exemplifies how Stata and, by the same account, R provide the platform for the users to innovate beyond the innate capacity of ... [Read more...]

The collaborative innovation landscape in data science

July 24, 2016 | Murtaza Haider

Computing platforms should be like Lego. That is, they should provide the fundamental building blocks and enable the users' imagination to innovate. The latest issue of Stata Journal exemplifies how Stata and, by the same account, R provide the platform for the users to innovate beyond the innate capacity of ... [Read more...]

Line plot for two-way designs using ggplot2

July 24, 2016 | Simon Jackson

Want to use R to plot the means and compare differences between groups, but don’t know where to start? This post is for you. As usual, let’s start with a finished example: library(dplyr) library(ggplot2) pd % mutate(cyl = factor(cyl), am = factor(am, labels = c("automatic", "manual"))) %__% ...
[Read more...]

RcppArmadillo 0.7.200.2.0

July 24, 2016 | Thinking inside the box

The second Armadillo release of the 7.* series came out a few weeks ago: version 7.200.2. And RcppArmadillo version 0.7.200.2.0 is now on CRAN and uploaded to Debian. This followed the usual thorough reverse-dependecy checking of by now over 240 pac... [Read more...]

Mid-year R Packages Update Summary

July 24, 2016 | hrbrmstr

I been updating some existing packages and github-releasing new ones (before a CRAN push). Most are “cyber”-related, but there are some general purpose ones. Here’s a quick overview: docxtractr (CRAN, now, v0.2.0) was initially designed to make it easy to get data tables out of MS Word (docx) ... [Read more...]

Predicting Agriculture, Poorly (Part I)

July 23, 2016 | MeanMean

Crop rotation is an agricultural production practice to increase yield, mitigate disease, and control pests. This production practice involves growing crops in specific sequences to improve the quality of soil for the following crop. A common example in the United States is the practice of growing soybeans before corn. In ... [Read more...]
1 2 3 4 5 6 17

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)