Articles by kjytay

A deep dive into glmnet: standardize

November 15, 2018 | kjytay

I’m writing a series of posts on various function options of the glmnet function (from the package of the same name), hoping to give more detail and insight beyond R’s documentation. In this post, we will focus on the standardize … Continue reading →
[Read more...]

A deep dive into glmnet: penalty.factor

November 13, 2018 | kjytay

The glmnet function (from the package of the same name) is probably the most used function for fitting the elastic net model in R. (It also fits the lasso and ridge regression, since they are special cases of elastic net.) … Continue reading →
[Read more...]

Getting started Stamen maps with ggmap

October 25, 2018 | kjytay

Spatial visualizations really come to life when you have a real map as a background. In R, ggmap is the package that you’ll want to use to get these maps. In what follows, we’ll demonstrate how to use ggmap with … Continue reading →
[Read more...]

Subsetting in the presence of NAs

October 6, 2018 | kjytay

In R, we can subset a data frame df easily by putting the conditional in square brackets after df. For example, if I want all the rows in df which have value equal to 1 in the column colA, all … Continue reading → [Read more...]

Different winners under different criteria

August 21, 2018 | kjytay

A few posts ago (see here), I noted that there was a group of 7 teams in the English Premier League (EPL) that seem to be a cut above the rest: Arsenal Chelsea Everton Liverpool Manchester City Manchester United Tottenham … Continue reading →
[Read more...]

Clustering EPL teams using k-means clustering

August 9, 2018 | kjytay

I recently got a hold of team rankings for the English Premier League (EPL) for the last 10 years (data was manually recorded from this Google sheet, available here in .csv format). I thought this would be a good opportunity … Continue reading →
[Read more...]

Math expressions in R plots

April 12, 2018 | kjytay

Did you know that you can include math expressions in your text annotations of figures in R? This webpage has an excellent tutorial on how to do so. In essence, you can put your plot label (with some syntax) in … Continue reading →
[Read more...]
1 3 4 5

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)