Articles by Andrew Treadway

10 R functions for Linux commands and vice-versa

December 10, 2018 | 0 Comments

This post will go through 10 different Linux commands and their R alternatives. If you’re interested in learning more R functions for working with files like some of those below, also check out this post. How to list all the files in a directory Linux R What does it do? ...
[Read more...]

Those “other” apply functions…

November 13, 2018 | 0 Comments

So you know lapply, sapply, and apply…but…what about rapply, vapply, or eapply? These are generally a little less known as far as the apply family of functions in R go, so this post will explore how they work. rapply Let’s start with rapply. This function has a ...
[Read more...]

How to run R from the Task Scheduler

October 31, 2018 | 0 Comments

In a prior post, we covered how to run Python from the Task Scheduler on Windows. This article is similar, but it’ll show how to run R from the Task Scheduler, instead. Similar to before, let’s first cover how to R from the command line, as knowing this ...
[Read more...]

How to build a logistic regression model from scratch in R

October 2, 2018 | 0 Comments

In a previous post, we showed how using vectorization in R can vastly speed up fuzzy matching. Here, we will show you how to use R’s vectorization functionality to efficiently build a logistic regression model. Now we could just use the caret or stats packages to create a model, ...
[Read more...]

Dpylthon…dplyr for Python!

September 5, 2018 | 0 Comments

If you’re an avid R user, you probably use the famous dplyr package. Python has a package meant to be similar to dplyr, called dplython. This article will give an introduction for how to use dplython. For the examples below, we’ll use a sample dataset that comes with ...
[Read more...]

Getting data from PDFs the easy way with R

August 24, 2018 | 0 Comments

Earlier this year, a new package called tabulizer was released in R, which allows you to automatically pull out tables and text from PDFs. Note, this package only works if the PDF’s text is highlightable (if it’s typed) — i.e. it won’t work for scanned-in PDFs, or ...
[Read more...]

How to get live stock prices with Python

July 31, 2018 | 0 Comments

In a previous post, I gave an introduction to the yahoo_fin package. The most updated version of the package includes new functionality allowing you to scrape live stock prices from Yahoo Finance (real-time). In this article, we’ll go through a couple ways of getting real-time data from Yahoo ...
[Read more...]

How to download image files with RoboBrowser

July 16, 2018 | 0 Comments

In a previous post, we showed how RoboBrowser can be used to fill out online forms for getting historical weather data from Wunderground. This article will talk about how to use RoboBrowser to batch download collections of image files from Pexels, a site which offers free downloads. If you’re ...
[Read more...]

R: How to create, delete, move, and more with files

July 11, 2018 | 0 Comments

Though Python is usually thought of over R for doing system administration tasks, R is actually quite useful in this regard. In this post we’re going to talk about using R to create, delete, move, and obtain information on files. How to get and change the current working directory ...
[Read more...]

ICA on Images with Python

June 23, 2018 | 0 Comments

Click here to see my recommended reading list. What is Independent Component Analysis (ICA)? If you’re already familiar with ICA, feel free to skip below to how we implement it in Python. ICA is a type of dimensionality reduction algorithm that transforms a set of variables to a new ...
[Read more...]

Coding with the Yahoo_fin Package

January 24, 2018 | 0 Comments

Subscribe to TheAutomatic.net via the area on the right side of the page. The yahoo_fin package contains functions to scrape stock-related data from Yahoo Finance and NASDAQ. You can view the official documentation by clicking this link, but the below post will provide a few more in-depth examples. ...
[Read more...]

Timing Python Processes

January 14, 2018 | 0 Comments

Timing Python processes is made possible with several different packages. One of the most common ways is using the standard library package, time, which we’ll demonstrate with an example. However, another package that is very useful for timing a process — and particularly telling you how far along a process ...
[Read more...]

Underrated R Functions

December 30, 2017 | 0 Comments

I wanted to write a post about a couple of handy functions in R that don’t always get the recognition they deserve. This article will talk about a few functions that form part of R’s core functional programming capabilities. R has thousands of functions, so this is just ...
[Read more...]

Vectorize Fuzzy Matching

December 11, 2017 | 0 Comments

One of the best things about R is its ability to vectorize code. This allows you to run code much faster than you would if you were using a for or while loop. In this post, we’re going to show you how to use vectorization to speed up fuzzy ...
[Read more...]

Running R Code in Parallel

October 14, 2017 | 0 Comments

Background Running R code in parallel can be very useful in speeding up performance. Basically, parallelization allows you to run multiple processes in your code simultaneously, rather than than iterating over a list one element at a time, or running a single process at a time. Thankfully, running R code ...
[Read more...]
1 2

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)