importExcel | R Documentation |
Uses readxl
to import a sheet of imaging data produced by the
Lemna Tec Scanalyzer. Basically, the data consists of imaging data obtained from a
set of pots or carts over time. There should be a column, which by default is called
Snapshot.ID.Tag
, containing a unique identifier for each cart and a column,
which by default is labelled Snapshot.Time.Stamp
, containing
the time of imaging for each observation in a row of the sheet. Also, if
startTime
is not NULL
, calcTimes
is called to
calculate, or recalculate if already present, timeAfterStart
from
imageTimes
by subtracting a supplied startTime
.
Using cameraType
, keepCameraType
, labsCamerasViews
and
prefix2suffix
, some flexibility is provided for renaming the columns with
imaging data. For example, if the column names are prefixed with 'RGB_SV1', 'RGB_SV2'
or 'RGB_TV', the 'RGB_' can be removed and the 'SV1', 'SV2' or 'TV' become suffices.
importExcel(file, sheet="raw data", sep = ",",
cartId = "Snapshot.ID.Tag",
imageTimes = "Snapshot.Time.Stamp",
timeAfterStart = "Time.after.Planting..d.",
cameraType = "RGB", keepCameraType = FALSE,
labsCamerasViews = NULL, prefix2suffix = TRUE,
startTime = NULL,
timeFormat = "%Y-%m-%d %H:%M",
plotImagetimes = TRUE, ...)
file |
A |
sheet |
A |
sep |
A |
cartId |
A |
imageTimes |
A |
timeAfterStart |
A |
cameraType |
A |
keepCameraType |
A |
labsCamerasViews |
A named |
prefix2suffix |
A |
startTime |
A |
timeFormat |
A |
plotImagetimes |
A |
... |
allows for arguments to be passed to |
A data.frame
containing the data.
Chris Brien
as.POSIXct
, calcTimes
, plotImagetimes
filename <- system.file("extdata/rawdata.xlsx", package = "growthPheno",
mustWork = TRUE)
raw.dat <- importExcel(file = filename,
startTime = "2015-02-11 0:00 AM")
camview.labels <- c("SF0", "SL0", "SU0", "TV0")
names(camview.labels) <- c("RGB_Side_Far_0", "RGB_Side_Lower_0",
"RGB_Side_Upper_0", "RGB_TV_0")
filename <- system.file("extdata/raw19datarow.csv", package = "growthPheno",
mustWork = TRUE)
raw.19.dat <- suppressWarnings(importExcel(file = filename,
cartId = "Snapshot.ID.Tags",
startTime = "06/10/2017 0:00 AM",
timeFormat = "%d/%m/%Y %H:M",
labsCamerasViews = camview.labels,
plotImagetimes = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.