imageGreenhouse: a function for representing a trait in the phenoarch...

Description Usage Arguments Details Value Examples

View source: R/graphicalFunctions.R

Description

a function for representing a trait in the phenoarch greenhouse

Usage

1
2
imageGreenhouse(datain, trait, xcol, ycol, numrow, numcol, typeD,
  typeT = 1, ylim = NULL, typeI = "ggplot2", typeV = NULL)

Arguments

datain

a dataframe to explore

trait

character, a parameter to draw

xcol

character, name of the abscissa column (Line or x...)

ycol

character, name of the ordinate column (Position or y...)

numrow

numeric, number of rows in the greenhouse

numcol

numeric, number of columns in the greenhouse

typeD

numeric, type of dataframe (1==wide, 2==long). If typeD==2, the input dataset must contain a 'Trait' column.

typeT

numeric, type of the trait (1: quantitatif, 2: qualitatif), 1 is the default

ylim

if trait is quantitative, numeric vectors of length 2, giving the trait coordinates ranges. default = NULL

typeI

character, type of image. "video" for createDynam.R program that produces a video of an experiment, "plotly" for interactive graphic for spatial visualisation, "ggplot2" for classical graphic in report pdf , default.

typeV

character, type de video, NULL by default, "absolute" for abs. video

Details

the data.frame in input must have the positions of each pot (Line and Position columns).

For plotly type graphic, the data frame in input must also contain id of plants (Manip, Pot, Genotype, Repsce)

Value

a ggplot2 object if plotly, the print of the ggplot2 object (a graph) otherwise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# a video call
 imageGreenhouse(datain=filter(plant2,Day==vecDay[Day]),trait="plantHeight",
                 xcol="Line",ycol="Position",numrow=28,numcol=60,
                 typeD=1,typeT=1,ylim=NULL,typeI="video")
# an interactive plotly call
 test<-imageGreenhouse(datain=plant4, trait="Biomass24",xcol="Line",ycol="Position",
                 numrow=28,numcol=60,typeD=1,typeT=1, ylim=NULL,typeI="plotly")
# test is a ggplot2 object, you have to render it with: plotly::ggplotly(test)
# a classical ggplot2 call
 imageGreenhouse(datain=plant4, trait="Biomass24",xcol="Line",ycol="Position",
                numrow=28,numcol=60,typeD=1,typeT=1, ylim=NULL,typeI="ggplot2")

sanchezi/phisStatR documentation built on Nov. 14, 2019, 7:10 p.m.