My R Codes Archive

This blog is developed as a personal library of R codes I have written. Even though this was meant to be a personal archive, I am having this blog open to public viewing in case any other R users find it useful. Hence, the codes may not be structured as neatly as online tutorial papers or blogs designed for educational purpose.

Wednesday, 18 December 2019

Insert text labels outside the plotting panel - lattice plot

›
In lattice, you can insert text labels inside the plot. This is useful but sometimes the labels get in the way. By changing the clip paramet...

Assigning object names in R

›
Assigning different object names to the output of each loop of iterative process can be done using assign() function.    Example:     ...
Monday, 19 March 2018

Working with R Objects

›
When you create R objects and wants to retrieve the contents of the R object by iterating through the names recorded in the environment, g...
Friday, 8 December 2017

3D Animated Graph - Rotation

›
For scatter plot: library(car) library(rgl) dat <- iris KM <- kmeans(dat[, 1:4], centers = 3) scatter3d( x = dat$Sepal.Lengt...

Connect to Google Map API from R

›
The below enables geocoding from R using Google Map API. The relevant website is: https://developers.google.com/maps/ There is a restr...
›
Home
View web version
Powered by Blogger.