User Tools

Site Tools


en:courses:training:element-01:worksheets:lc-ws-01-2

W01-2: Read the field data

In this worksheet, we will read and explore the data that were collected during the field campaign on Fogo 2015. After completing this worksheet you should be able to read tables into R and access individual information from the data.

Things you need for this worksheet

  • R — the interpreter can be installed on any operation system. For Linux, you should use the r-cran packages supplied for your Linux distribution. If you use Ubuntu, this is one of many starting points. If you use Windows, you could install R from the official CRAN web page.

  • R Studio — we recommend to use R Studio for (interactive) programming with R. You can download R Studio from the official web page.

The big picture

During September 2015, an ecological field survey has been carried out on Fogo island. The survey encompassed 115 plots of 5 meters by 5 meters on which data on agricultural and natural vegetation as well as on diversity has been collected.

During the following worksheets, selected aspects of this data set are analyzed. Later worksheets will build on the general land use/ land cover attributes of the field data. They will serve as “training data” for a land cover classification, though they will have to be complemented by remotely derived training sites.

Learning log assignments

In this worksheet, we will read and explore the data that were collected during the field campaign on Fogo 2015

:-\ Please download the field survey data and write an R script which reads the content of the data into a data frame. Check if everything is ok by looking at the first few lines of the data once the reading has been completed and get a comprehensive summary of the data set using the summary() function.

The R script you have just created will form the basis for the upcoming worksheets, so make sure you save it. For simplicity, please name your script files after the worksheet (i.e. “W01-2.R” in this case).

:-\ Please perform the following task as a finger exercises on accessing data subsets inside a data frame:

  • Get the values of the first column of the data frame (try both column access methods!)
  • Get the values of the first row of the data frame
  • Get the value of the second column in the first row of the data frame
  • Get the first 10 values of the first column of the data frame
  • Get the first 10 values of the first three columns of the data frame
en/courses/training/element-01/worksheets/lc-ws-01-2.txt · Last modified: 2022/03/13 19:16 by 127.0.0.1