Articles by kjytay

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 2 3 4

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)