yieldconvert: Convert the yield data of plot into different units

Description Usage Arguments Value Examples

View source: R/convertyield.R

Description

The function converts the yield data of plot into qtl/ha, tonnes/ha, qtl/acre or tonnes/acre depending on the option chosen.

Usage

1
yieldconvert(yield.in.kg, length.of.plot, width.of.plot, choose.convert.to)

Arguments

yield.in.kg

yield data in kilograms

length.of.plot

length of plot in m

width.of.plot

width of the plot in m

choose.convert.to

0 for qtl/ha, 1 for tonnes/ha, 2 for qtl/acre and 3 for tonnes/acre

Value

converted yield

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Convert yield vector obtained from 10m x 5m plot into different forms
yield<-c(10,15,12,16,19,25,30,25,11)
#For converting into qtl/ha
yieldconvert(yield,10,5,0)
#For converting into tonnes/ha
yieldconvert(yield,10,5,1)
#For converting into qtl/acre
yieldconvert(yield,10,5,2)
#For converting into tonnes/acre
yieldconvert(yield,10,5,3)

Example output

[[1]]
[1] "Converted to Qtl/Ha"

[[2]]
[1] 20 30 24 32 38 50 60 50 22

[[1]]
[1] "Converted to Tonnes/Ha"

[[2]]
[1] 2.0 3.0 2.4 3.2 3.8 5.0 6.0 5.0 2.2

[[1]]
[1] "Converted to Qtl/Acre"

[[2]]
[1]  8.093720 12.140580  9.712464 12.949952 15.378068 20.234300 24.281160
[8] 20.234300  8.903092

[[1]]
[1] "Converted to Tonnes/Acre"

[[2]]
[1] 0.8093720 1.2140580 0.9712464 1.2949952 1.5378068 2.0234300 2.4281160
[8] 2.0234300 0.8903092

doebioresearch documentation built on July 8, 2020, 7:18 p.m.