Andrie de Vries

Andrie de Vries is a leading R expert and Business Services Director for Revolution Analytics. With over 20 years of experience, he provides consulting and training services in the use of R.

Articles & Books From Andrie de Vries

Cheat Sheet / Updated 07-29-2022
R is more than just a statistical programming language. It’s also a powerful tool for all kinds of data processing and manipulation, used by a community of programmers and users, academics, and practitioners.To get the most out of R, you need to know how to access the R Help files and find help from other sources.
Article / Updated 10-28-2021
In the R programming language, a conversion from a matrix to a data frame can’t be used to construct a data frame with different types of values. If you combine both numeric and character data in a matrix, for example, everything will be converted to character.You can construct a data frame from scratch, though, using the data.
Article / Updated 03-26-2016
R has many functions that allow you to import data from other applications. The following table lists some of the useful text import functions, what they do, and examples of how to use them. Function What It Does Example read.table() Reads any tabular data where the columns are separated (for example by commas or tabs).
Article / Updated 03-26-2016
In addition to R For Dummies, there are many online resources for the aspiring or experienced R programmer. They'll help you find answers or learn valuable tips and tricks. (Or, they're just fun!) Cookbook for R The goal of the Cookbook for R is to provide solutions to common tasks and problems in analyzing data.
Article / Updated 03-26-2016
Vectors, lists, and data frames play an important role in representing data in R, so being able to succinctly and correctly specify a subset of your data is important. There are three main operators that you can use to subset your data: $: Extracts a single element by name from a list or data frame. For example, iris$Sepal.
Article / Updated 03-26-2016
Even with good introductory books on R, you'll need to use the R Help files. The R Help files provide detailed information about the use of different functions and their peculiarities. R has excellent built-in help for every function that explains how to use that function. Just about every Help page has some examples that demonstrate how to use that function.
Article / Updated 03-26-2016
Like any programming language, R makes it easy to compile lists of sorted and ordered data. To find substrings, you can use the grep() function, which takes two essential arguments: pattern: The pattern you want to find. x: The character vector you want to search. Suppose you want to find all the states that contain the pattern New.
Article / Updated 03-26-2016
To dive a bit deeper into how you can use vectors in R, let’s consider this All-Star Grannies example. You have two vectors that contain the number of baskets that Granny and her friend Geraldine scored in the six games of this basketball season: > baskets.of.Granny <- c(12, 4, 4, 6, 9, 3) > baskets.of.Geraldine <- c(5, 3, 2, 2, 12, 9) The c() function stands for combine.
Article / Updated 03-26-2016
Once you have a really good grip on using date and time, you may want to explore additional functionality available in R and add-on packages by looking at the following: chron: R has the simpler chron class for datetime objects that don’t have a time zone. To investigate this class, first load the chron package with library(“chron”) and then read the Help file ?
Article / Updated 03-26-2016
R is more than just a domain-specific programming language aimed at data analysis. It has some unique features that make it very powerful, the most important one arguably being the notion of vectors. These vectors allow you to perform sometimes complex operations on a set of values in a single command. Performing multiple calculations with vectors R is a vector-based language.