LUMA Tutorial

R tutorials – How to use LUMA data?
Here we provide a few simple R examples.

They are developed for students with no/small experience with R and give an introduction in different variables types and file formats. Please always download the relevant materials (right click – save as…) and go through the code provided in the .R – scripts line-by-line in order to explore the functions and commands used in the code. Detailed explanations are provided in the comment lines (lines leaded by a #-symbol).
Exercise 1: How to import data from a text file?

R script: E1_ImportData
data file: LaqnData.csv (comma separated text file)

Exercise 2: How to import data from a KUMA NetCDF file and convert it to a text (ascii) file?

R script: E2_ncdf2ascii
also required are the function in readKUMA – save this file to the same folder as the E2_ncdf2ascii.R script
data file: (binary file format: NetCDF)

Once you have read the data create a plot

New to R?

There are a lot of tutorials online (there is also very good help:

For example:

An Introduction to R

First tutorial

Getting Started with R

R graphics

R graphics