fieldShape: Building the plot shape file

Description Usage Arguments Details Value References Examples

View source: R/fieldShape.R

Description

The user should select the four experimental field corners and the shape file with plots will be automatcly built using a grid with the number of ranges and rows. Attention: The base of image should be parallel to axis X, please use first the function fieldRotate().

Usage

1
  fieldShape(mosaic,ncols=10,nrows=10,nPoint=4,fieldMap=NULL,fieldData=NULL,ID=NULL,plot=T,fast.plot=F)

Arguments

mosaic

object of class stack obtained from function fieldRotate() with the base of image parallel to axis X.

ncols

number of ranges.

nrows

number of rows.

nPoint

number of points necessary to select field boundaries or area to remove (4 >= nPoint <= 50).

fieldMap

matrix with plots ID identified by rows and ranges, please use first the funsction fieldMap().

fieldData

data frame with plot ID and all attributes of each plot (Traits as columns and genotypes as rows).

ID

name of plot ID in the fieldData file to combine with fieldShape.

plot

if is TRUE the crop image and fieldShape will be plotted.

fast.plot

if TRUE only the grey scale image will be plotted as reference (faster approach).

Details

The function returns the fieldShape format SpatialPolygonsDataFrame with plots numbered from left to right and top to bottom, and a new reduced image with format stack. The fieldMap can be used to identify the plot ID.

Value

List with fieldShape format SpatialPolygonsDataFrame and experimental field image with format stack.

References

Matias et al. (2019) FIELDimageR: A R Package to Analyze Orthomosaic Images from Agricultural Field Trials. (submitted)

Examples

1
  ##see Vignette at https://github.com/filipematias23/FIELDimageR

angel30mpa/ampa documentation built on Feb. 22, 2020, 12:17 a.m.