plot_soilProfile: plot soil profile data

Description Usage Arguments Value Note Author(s) Examples

View source: R/plot_soilProfile.R

Description

This is a simple function for plotting soil profile data that is supplied in dataframe form.

Usage

1
plot_soilProfile(data, vals, depths, label="")

Arguments

data

dataframe; Usually a typical soil information data frame with identifier and soil depth labelled columns, followed by one or more columns of soil attribute or even soil categorical data.

vals

vector; Would generally point to a column of data, and is the soil attribute value that needs to be ploted.

depths

dataframe; Would generally point to the two columns of data which specify the upper and lower depths of the soil profile observations.

label

character; An optional input the put a label on the x-axis, otherwise it will remain blank.

Value

Function returns a labeled plot of the soil profile information. The length of the bars corresponds to the value of the soil variable being plotted.

Note

This function is really designed to plot one soil profile at a time. Would need to be inserted into another function if plotting of a collection of soil profiles is required.

Author(s)

Brendan Malone

Examples

1
2
3
4
5
6
7
library(ithir)

data(oneProfile)
str(oneProfile)

#do plot
plot_soilProfile(data = oneProfile, vals = oneProfile$C.kg.m3., depths = oneProfile[,2:3], label= names(oneProfile)[4])

ithir documentation built on May 2, 2019, 4:49 p.m.