15 Page Tutorial for R

For Beginners in R, here is a 15 page example based tutorial that covers the basics of R. Starting R – Trivial tutorial on how to start R for those just wondering what to do next after downloading R. Assignment Operator – Two important assignment operators in R are <- and = Listing Objects – … Read more

Categories R

R and GIS – working with shapefiles

R has some very useful libraries for working with spatial data. In this blog we will look at some of the libraries and demonstrate few basic functionalities. Lets start with reading a shapefile. How to read a shapefile : We will use the maptools package to read the shape file. Along with the maptools package, … Read more

Categories R

Java convert a list to a csv string

Here’s an easy way to convert a list of Strings to a String containing csv values <pre  class=”brush:java”> StringUtils.join(list, ‘,’) </pre> To reverse conversion can be done by – csv to list <pre  class=”brush:java”> Arrays.asList(StringUtils.split(rs.getString(“a,b”), “,”)) </pre>  

Running R from Eclipse – StatET Features

In The previous blog we looked at how to install the StatET plugin that can be used to run R from eclipse. In This tutorial we will look at the various features of the plugin. Creating a New R Project or File. The plugin provides the following options We create a new R Project and … Read more

Categories R

Running R from Eclipse – StatET installation and Usage

Many developers, especially the Java developers are quite comfortable using eclipse for development. There is a very useful and powerful plugin called StatET that can enable eclipse to work as in IDE for R. Lets first look at how to install it on Linux(Ubuntu). The plugin is available from the eclipse marketplace. The eclipse update … Read more

Categories R

rapply function – explanation and examples

In this post we will look at one of the powerful ‘apply’ group of functions in R – rapply. rapply stands for recursive apply, and as the name suggests it is used to apply a function to all elements of a list recursively. We begin by first creating a straightforward list we use the rapply … Read more

Categories R

Systemd and Systemctl – services, units and run levels

systemd has replaced the univ SysV (System V) and BSD init systems  in majority of the linux distributions. Centos 7 now has systemd and has changed the way services are handled. This is not a comprehensive tutorial but a simple introduction on how services are added, started, enabled, listed and removed using systemctl. Before we … Read more

cat all files recursively in a directory

find . -name ‘*.txt’ -exec cat {} \; This command finds all files that have an extension of .txt in the current directory and its sub directories and executes a cat command on them

Total size of a directory in unix

Use the du command to get the size of a directory du -h prints the size of current directory and each directory under it in a human readable form. To get the size of the current directory only use this command du -sh to get the size of a particular directory du -sh