| Title: | Wrangle and Analyze Growth Curve Data |
|---|---|
| Description: | Easy importing, wrangling, and model-free analysis of microbial growth curve data, as commonly output by plate readers. Tools for flexibly importing all the common data formats output by plate readers and reshaping them into 'tidy' formats for analyses. Tools for importing experimental designs from files or generating them in R and merging design information with density data, making it easy to analyze with 'gcplyr' and 'tidyverse' or 'dplyr' functions, and to plot with 'ggplot2'. Streamlines extracting parameters like growth rate/doubling time, maximum density (carrying capacity), lag time, area under the curve, diauxic shifts, extinction, and more without fitting an equation for growth to your data. Has several methods to deal with noise in growth curve data. See methods at <https://mikeblazanin.github.io/gcplyr/>. |
| Authors: | Mike Blazanin [aut, cre] (ORCID: <https://orcid.org/0000-0003-4630-6235>) |
| Maintainer: | Mike Blazanin <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.13.1 |
| Built: | 2026-10-16 21:39:32 UTC |
| Source: | https://github.com/mikeblazanin/gcplyr |
This function takes a vector of x and y values
and returns a scalar for the area under the curve, calculated using
the trapezoid rule
auc( x, y, xlim = NULL, blank = 0, subset = NULL, na.rm = TRUE, neg.rm = FALSE, warn_xlim_out_of_range = TRUE, warn_negative_y = TRUE )auc( x, y, xlim = NULL, blank = 0, subset = NULL, na.rm = TRUE, neg.rm = FALSE, warn_xlim_out_of_range = TRUE, warn_negative_y = TRUE )
x |
|
y |
|
xlim |
|
blank |
Value to be subtracted from |
subset |
A |
na.rm |
a |
neg.rm |
a |
warn_xlim_out_of_range |
|
warn_negative_y |
|
A scalar for the total area under the curve
This function allows users to convert designs created with tidydesign into a block format for easy output to csv for inclusion in lab notebooks, etc in a human-readable format
block_tidydesign( tidydesign, collapse = NULL, wellnames_sep = "_", wellnames_colname = "Well" )block_tidydesign( tidydesign, collapse = NULL, wellnames_sep = "_", wellnames_colname = "Well" )
tidydesign |
A tidydesign |
collapse |
|
wellnames_sep |
A |
wellnames_colname |
Header for newly-created column containing the well names |
A list of blockdesign data.frames (if collapse is not
NULL the list is of length 1
Provided a vector of y values, this function returns either the plain
or per-capita difference or derivative between sequential values
calc_deriv( y, x = NULL, return = "derivative", percapita = FALSE, x_scale = 1, blank = NULL, subset_by = NULL, window_width = NULL, window_width_n = NULL, window_width_frac = NULL, window_width_n_frac = NULL, trans_y = "linear", na.rm = TRUE, warn_ungrouped = TRUE, warn_logtransform_warnings = TRUE, warn_logtransform_infinite = TRUE, warn_window_toosmall = TRUE )calc_deriv( y, x = NULL, return = "derivative", percapita = FALSE, x_scale = 1, blank = NULL, subset_by = NULL, window_width = NULL, window_width_n = NULL, window_width_frac = NULL, window_width_n_frac = NULL, trans_y = "linear", na.rm = TRUE, warn_ungrouped = TRUE, warn_logtransform_warnings = TRUE, warn_logtransform_infinite = TRUE, warn_window_toosmall = TRUE )
y |
Data to calculate difference or derivative of |
x |
|
return |
One of |
percapita |
When |
x_scale |
Set |
blank |
If a |
subset_by |
An optional This provides an internally-implemented approach similar to group_by and mutate |
window_width, window_width_n, window_width_frac, window_width_n_frac
|
Set how many data points are used to determine the slope at each point. When all are When one or multiple are specified, a linear regression is fit to all points in the window to determine the slope.
When using multiple window specifications at the same
time, windows are conservative. Points
included in each window will meet all of the
A value of |
trans_y |
One of
For per-capita growth expected to be exponential or
nearly-exponential, |
na.rm |
|
warn_ungrouped |
|
warn_logtransform_warnings |
|
warn_logtransform_infinite |
|
warn_window_toosmall |
|
For per-capita derivatives, trans_y = 'linear' and
trans_y = 'log' approach the same value as time resolution
increases.
For instance, let's assume exponential growth $N = e^rt$ with per-capita growth rate $r$.
With trans_y = 'linear', note that $dN/dt = r e^rt = r N$.
So we can calculate per-capita growth rate as $r = dN/dt * 1/N$.
With trans_y = 'log', note that $log(N) = log(e^rt) = rt$.
So we can calculate per-capita growth rate as the slope of a linear
fit of $log(N)$ against time, $r = log(N)/t$.
A vector of values for the plain (if percapita = FALSE)
or per-capita (if percapita = TRUE) difference
(if return = "difference") or derivative
(if return = "derivative") between y values. vector
will be the same length as y, with NA values
at the ends
This function takes a vector of x and y values
and returns the x and/or y position of the centroid of mass of the
area under the curve
centroid( x, y, return, xlim = NULL, blank = 0, subset = NULL, na.rm = TRUE, neg.rm = FALSE, warn_xlim_out_of_range = TRUE, warn_negative_y = TRUE ) centroid_x(x, y, return = "x", ...) centroid_y(x, y, return = "y", ...) centroid_both(x, y, return = "both", ...)centroid( x, y, return, xlim = NULL, blank = 0, subset = NULL, na.rm = TRUE, neg.rm = FALSE, warn_xlim_out_of_range = TRUE, warn_negative_y = TRUE ) centroid_x(x, y, return = "x", ...) centroid_y(x, y, return = "y", ...) centroid_both(x, y, return = "both", ...)
x |
|
y |
|
return |
One of |
xlim |
|
blank |
Value to be subtracted from |
subset |
A |
na.rm |
a |
neg.rm |
a |
warn_xlim_out_of_range |
|
warn_negative_y |
|
... |
Other arguments to pass to |
This function uses st_centroid to calculate the centroid of mass
A scalar for the x value (if return = 'x') or
y value (if return = 'y') of the centroid of the data
Provided a vector of per-capita growth rates, this function returns
the vector of equivalent doubling times
doubling_time(y, x_scale = 1)doubling_time(y, x_scale = 1)
y |
|
x_scale |
Set |
A vector of values for the doubling time equivalent to the
per-capita growth rate supplied for y
A tidy-shaped dataset with the experimental design (i.e. plate layout)
for the example data included with gcplyr.
example_design_tidyexample_design_tidy
A data.frame with 96 rows and 3 variables:
Well: The well of the plate
Bacteria_strain: The numbered bacterial strain growing in each well
Phage: Whether or not the bacteria were simulated growing with phages
Wells A1...A8 through F1...F8 contain 48 different
simulated bacterial strains growing alone. Wells G1...G8 through L1...L8
contain the same 48 bacterial strains in an identical layout, but this
time growing in the presence of a phage
A dataset containing example growth of 96 wells of simulated bacteria or bacteria and phages
example_widedataexample_widedata
A data.frame with 97 rows and 97 variables:
time: time, in seconds, since growth curve began
A1, A2...H11, H12: bacterial density in the given well
Wells A1...A8 through F1...F8 contain 48 different
simulated bacterial strains growing alone. Wells G1...G8 through L1...L8
contain the same 48 bacterial strains in an identical layout, but this
time growing in the presence of a phage
Bacterial populations exhibit diauxic growth as they approach their carrying capacity, and they also evolve resistance in the face of selection from the phage population.
This data includes some simulated noise to approximate the noise generated during data collection by plate readers
A dataset containing example growth of 96 wells of simulated bacteria or bacteria and phages
example_widedata_noiselessexample_widedata_noiseless
A data.frame with 97 rows and 97 variables:
time: time, in seconds, since growth curve began
A1, A2...H11, H12: bacterial density in the given well
Wells A1...A8 through F1...F8 contain 48 different
simulated bacterial strains growing alone. Wells G1...G8 through L1...L8
contain the same 48 bacterial strains in an identical layout, but this
time growing in the presence of a phage
Bacterial populations exhibit diauxic growth as they approach their carrying capacity, and they also evolve resistance in the face of selection from the phage population.
This data does not include any simulated noise
A wrapper for [ that handles NA indices better when using
inside summarize
extr_val(x, i, allNA_NA = TRUE, na.rm = FALSE)extr_val(x, i, allNA_NA = TRUE, na.rm = FALSE)
x |
object from which to extract element(s) |
i |
index specifying element to extract. |
allNA_NA |
|
na.rm |
a |
This function was created to better handle the common situation
of extracting values by index inside summarize when some
indices may be NA.
Often this arises when using a function to find indices of interest might
fail to find any, as can sometimes happen when using
which_max_gc or which_min_gc (wrappers for which.max
and which.min, respectively),
find_local_extrema and its wrappers first_maxima and
first_minima, or find_threshold_crosses and its wrappers
first_below and first_above. When all indices are NA,
[ returns a vector of all NA of length length(x).
Since this typically raises an undesirable warning or error from
summarize, extr_val instead returns a single NA
value.
An alternative (but largely superseded) use of this function is to
extract a value by index after NA values have been removed.
This is not applicable for any common functions with gcplyr,
which all return index values for the original vector.
If allNA_NA = FALSE and na.rm = FALSE, identical to
x[i].
If allNA_NA = FALSE and na.rm = TRUE, identical to
x[i[!is.na(i)]].
If allNA_NA = TRUE, identical to x[i] unless
all(is.na(i)) == TRUE, in which case returns NA
These functions take a vector of y values and identify local extrema.
find_local_extrema( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, window_width_frac = NULL, window_width_n_frac = NULL, return = "index", return_maxima = TRUE, return_minima = TRUE, return_endpoints = TRUE, subset = NULL, na.rm = TRUE, width_limit = NULL, width_limit_n = NULL, height_limit = NULL ) first_maxima( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, window_width_frac = NULL, window_width_n_frac = 0.2, return = "index", return_endpoints = TRUE, ... ) first_minima( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, window_width_frac = NULL, window_width_n_frac = 0.2, return = "index", return_endpoints = TRUE, ... )find_local_extrema( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, window_width_frac = NULL, window_width_n_frac = NULL, return = "index", return_maxima = TRUE, return_minima = TRUE, return_endpoints = TRUE, subset = NULL, na.rm = TRUE, width_limit = NULL, width_limit_n = NULL, height_limit = NULL ) first_maxima( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, window_width_frac = NULL, window_width_n_frac = 0.2, return = "index", return_endpoints = TRUE, ... ) first_minima( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, window_width_frac = NULL, window_width_n_frac = 0.2, return = "index", return_endpoints = TRUE, ... )
y |
|
x |
Optional |
window_width, window_width_n, window_height, window_width_frac, window_width_n_frac
|
Arguments that set the width/height of the window used to search for local extrema.
For example, the function will not pass a peak or valley
more than A narrower width will be more sensitive to narrow local maxima/minima, while a wider width will be less sensitive to local maxima/minima. A smaller height will be more sensitive to shallow local maxima/minima, while a larger height will be less sensitive to shallow maxima/minima. |
return |
One of |
return_maxima, return_minima
|
|
return_endpoints |
Should the first and last values in |
subset |
A If |
na.rm |
|
width_limit |
Deprecated, use |
width_limit_n |
Deprecated, use |
height_limit |
Deprecated, use |
... |
(for |
For find_local_extrema, one of window_width,
window_width_n, window_height, or window_width_n_frac
must be provided.
For first_minima or first_maxima, set
window_width_n_frac = NULL to override default width behavior.
If multiple of window_width, window_width_n,
window_height, or window_width_n_frac are provided, steps
are limited conservatively (a single step must meet all criteria).
In the case of exact ties in y values within a window, only the
first local extrema is returned.
find_local_extrema returns a vector corresponding to all the
found local extrema.
first_maxima returns only the first maxima, so is a shortcut for
find_local_extrema(return_maxima = TRUE, return_minima = FALSE)[1]
first_minima returns only the first minima, so is a shortcut for
find_local_extrema(return_maxima = FALSE, return_minima = TRUE)[1]
If return = "index", the returned value(s) are the indices
corresponding to local extrema in the data
If return = "x", the returned value(s) are the x value(s)
corresponding to local extrema in the data
If return = "y", the returned value(s) are the y value(s)
corresponding to local extrema in the data
numeric vector
This function has been deprecated in favor of the identical new function first_maxima
first_peak( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, return = "index", return_endpoints = TRUE, ... )first_peak( y, x = NULL, window_width = NULL, window_width_n = NULL, window_height = NULL, return = "index", return_endpoints = TRUE, ... )
y |
|
x |
Optional |
window_width |
Width of the window (in units of |
window_width_n |
The maximum number of data points a single
extrema-search step is allowed to take. For example,
when maxima-finding, the function will not pass
a valley consisting of more than A smaller If not provided, defaults to |
window_height |
The maximum change in A smaller |
return |
One of |
return_endpoints |
Should the first or last value in |
... |
Other parameters to pass to find_local_extrema |
This function takes a vector of y values and returns the index
(by default) of the first local maxima. It serves as a shortcut
for find_local_extrema(return_maxima = TRUE, return_minima = FALSE)[1]
If none of window_width, window_width_n, or
window_height are provided, default value of window_width_n
will be used.
If return = "index", a vector of indices corresponding
to local extrema in the data
If return = "x", a vector of x values corresponding
to local extrema in the data
If return = "y", a vector of y values corresponding
to local extrema in the data
A function that converts base-26 Excel-style letters to numbers
from_excel(x)from_excel(x)
x |
A |
A vector of numbers in base-10
This function is a wrapper for smooth.spline, which fits
a cubic smoothing spline to the supplied data, but includes the option
to remove NA values, and returns values in the original order.
gc_smooth.spline(x, y = NULL, ..., na.rm = TRUE)gc_smooth.spline(x, y = NULL, ..., na.rm = TRUE)
x |
A |
y |
A |
... |
Additional arguments passed to smooth.spline. |
na.rm |
|
See smooth.spline
Similar to smooth.spline, an object of class
"smooth.spline" with many components. Differs in that
x, y, and w have NA's at any indices where x or y were
NA in the inputs, and x, y, and w are returned to match the input
x in order and length
Function to import block-shaped designs from files and return tidy designs. This function acts as a wrapper that calls read_blocks, paste_blocks, trans_block_to_wide, trans_wide_to_tidy, and separate_tidy
import_blockdesigns( files, block_names = NULL, block_name_header = "block_name", join_as_cols = TRUE, sep = NULL, values_colname = "Designs", into = NULL, keep_blocknames = !join_as_cols, warn_joinrows_nointo = TRUE, join_designs = NULL, ... )import_blockdesigns( files, block_names = NULL, block_name_header = "block_name", join_as_cols = TRUE, sep = NULL, values_colname = "Designs", into = NULL, keep_blocknames = !join_as_cols, warn_joinrows_nointo = TRUE, join_designs = NULL, ... )
files |
A |
block_names |
When When |
block_name_header |
When |
join_as_cols |
|
sep |
If designs have been pasted together, this specifies the
|
values_colname |
When |
into |
When |
keep_blocknames |
|
warn_joinrows_nointo |
|
join_designs |
Deprecated, use |
... |
Other arguments to pass to read_blocks, paste_blocks, trans_block_to_wide, trans_wide_to_tidy, or separate_tidy. See Details for more information |
Other common arguments that you may want to provide via
... include:
startrow, endrow, startcol, endcol,
sheet - specifying the location of design information
inside files to read_blocks.
wellnames_sep - specifying what character (or "" for
none) should be used when pasting together the rownames and
column names. Note that this should be chosen to match
the well names in your measures.
into - specifying the column names resulting from
using separate_tidy on the values_colname column.
Note that import_blockdesigns cannot currently handle
metadata specified via the metadata argument of
read_blocks.
If you find yourself needing more control, you can run the steps manually, first reading with read_blocks, pasting as needed with paste_blocks, transforming to tidy with trans_block_to_wide and trans_wide_to_tidy, and separating as needed with separate_tidy.
A tidy-shaped data.frame containing the design information
from files. This always includes a Well column.
If keep_blocknames = TRUE, this includes a column with the
column name specified by block_name_header and containing
block_names (or block names inferred from file names).
The layout of the design values varies depending on the inputs:
If join_as_cols = TRUE, each block was joined as a column,
with the columns named according to block_names (or block
names inferred from file names). In this case, if sep was
specified, each column was split by sep into columns named by
splitting the corresponding block name by sep (post-split
column names can alternatively be specified directly via into).
Otherwise, when join_as_cols = FALSE, each block was joined
as rows, with the column containing all design values named by
values_colname. In this case, if sep was specified,
that single design column was split by sep into columns
named by splitting values_colname (post-split column names
can alternatively be specified directly via into).
Function to import blockmeasures from files and return widemeasures. This function acts as a wrapper to call read_blocks, uninterleave, then trans_block_to_wide in one go.
import_blockmeasures( files, num_plates = 1, plate_names = NULL, wellnames_sep = "", ... )import_blockmeasures( files, num_plates = 1, plate_names = NULL, wellnames_sep = "", ... )
files |
|
num_plates |
Number of plates. If multiple plates uninterleave will be used to separate blockmeasures into those plates accordingly |
plate_names |
(optional) Names to put onto the plates when output |
wellnames_sep |
|
... |
Other arguments to pass to read_blocks, uninterleave, or trans_block_to_wide |
Common arguments that you may want to provide via ... include:
startrow, endrow, startcol, endcol, sheet - specifying the
location of design information inside files to read_blocks
metadata - specifying metadata to read_blocks
See read_blocks for more details
If you find yourself needing more control, you can run the steps manually, first reading with read_blocks, separating plates as needed with uninterleave, then transforming to wide with trans_block_to_wide.
If num_plates = 1, a wide-shaped data.frame
containing the measures data.
if num_plates is greater than one, a list of
data.frame's, where each data.frame is wide-shaped.
Lag time is calculated by projecting a tangent line at the point
of maximum (per-capita) derivative backwards to find the time when it
intersects with the minimum y-value
lag_time( x = NULL, y = NULL, deriv = NULL, blank = NULL, trans_y = "log", na.rm = TRUE, slope = NULL, x1 = NULL, y1 = NULL, y0 = NULL, warn_logtransform_warnings = TRUE, warn_logtransform_infinite = TRUE, warn_min_y_mismatch = TRUE, warn_multiple_maxderiv = TRUE, warn_one_lag = TRUE, warn_no_lag = TRUE, warn_blank_length = TRUE )lag_time( x = NULL, y = NULL, deriv = NULL, blank = NULL, trans_y = "log", na.rm = TRUE, slope = NULL, x1 = NULL, y1 = NULL, y0 = NULL, warn_logtransform_warnings = TRUE, warn_logtransform_infinite = TRUE, warn_min_y_mismatch = TRUE, warn_multiple_maxderiv = TRUE, warn_one_lag = TRUE, warn_no_lag = TRUE, warn_blank_length = TRUE )
x |
|
y |
|
deriv |
|
blank |
A |
trans_y |
One of
|
na.rm |
a |
slope |
Slope to project from |
x1 |
|
y1 |
|
y0 |
|
warn_logtransform_warnings |
|
warn_logtransform_infinite |
|
warn_min_y_mismatch |
|
warn_multiple_maxderiv |
|
warn_one_lag |
|
warn_no_lag |
|
warn_blank_length |
|
For most typical uses, simply supply x, y, and deriv
(using the per-capita derivative and trans_y = 'log').
Advanced users may wish to use alternate values for the slope of the tangent
line (slope), origination point of the tangent line (x1,
y1), or minimum y-value y0. If specified, these values will
override the default calculations. If and only if all of slope,
x1, y1, and y0 are provided, lag_time is
vectorized on their inputs and will return a vector of lag time values.
Typically a scalar of the lag time in units of x. See Details for
cases when value will be a vector.
This is a function to easily input experimental design elements for later merging with read data
make_design( nrows = NULL, ncols = NULL, block_row_names = NULL, block_col_names = NULL, block_name_header = "block_name", output_format = "tidy", wellnames_numeric = FALSE, wellnames_sep = "", wellnames_colname = "Well", colnames_first = FALSE, lookup_tbl_start = 1, pattern_split = "", ... )make_design( nrows = NULL, ncols = NULL, block_row_names = NULL, block_col_names = NULL, block_name_header = "block_name", output_format = "tidy", wellnames_numeric = FALSE, wellnames_sep = "", wellnames_colname = "Well", colnames_first = FALSE, lookup_tbl_start = 1, pattern_split = "", ... )
nrows, ncols
|
Number of rows and columns in the plate data |
block_row_names, block_col_names
|
Names of the rows, columns of the plate blockmeasures data |
block_name_header |
The name of the field containing the
|
output_format |
One of For easy merging with tidymeasures, leave as default of 'tidy'. For human-readability to confirm design is correct, choose 'blocks' or 'blocks_pasted'. For writing to block-shaped file(s), choose 'blocks' or 'blocks_pasted'. |
wellnames_numeric |
If If If |
wellnames_sep |
A |
wellnames_colname |
Header for newly-created column containing the
well names, when |
colnames_first |
When wellnames are created for
|
lookup_tbl_start |
Value in the lookup table for the split pattern values
that corresponds to the first value in the Lookup table by default is
|
pattern_split |
character to split pattern elements provided in
|
... |
Each
|
Note that either nrows or block_row_names must be provided
and that either ncols or block_col_names must be provided
Depends on output_format:
If output_format = "blocks", a list of data.frame's
where each data.frame is block-shaped containing the
information for a single design element
If output_format = "blocks_pasted", a single
data.frame containing the paste-ed information
for all design elements
If output_format = "wide", a wide-shaped data.frame
containing all the design elements
If output_format = "tidy", a tidy-shaped data.frame
containing all the design elements
make_design(nrows = 8, ncols = 12, design_element_name = list(c("A", "B", "C"), 2:7, 2:11, "112301", TRUE)) ## To be reminded what arguments are needed, use make_designpattern: make_design(nrows = 8, ncols = 12, design_element_name = make_designpattern( values = c("A", "B", "C"), rows = 2:7, cols = 2:11, pattern = "112301", byrow = TRUE))make_design(nrows = 8, ncols = 12, design_element_name = list(c("A", "B", "C"), 2:7, 2:11, "112301", TRUE)) ## To be reminded what arguments are needed, use make_designpattern: make_design(nrows = 8, ncols = 12, design_element_name = make_designpattern( values = c("A", "B", "C"), rows = 2:7, cols = 2:11, pattern = "112301", byrow = TRUE))
A helper function for use with make_design
make_designpattern( values, rows, cols, pattern = 1:length(values), byrow = TRUE ) mdp(values, rows, cols, pattern = 1:length(values), byrow = TRUE)make_designpattern( values, rows, cols, pattern = 1:length(values), byrow = TRUE ) mdp(values, rows, cols, pattern = 1:length(values), byrow = TRUE)
values |
|
rows |
|
cols |
|
pattern |
|
byrow |
|
list(values, rows, cols, pattern, byrow)
make_design(nrows = 8, ncols = 12, design_element_name = make_designpattern( values = c("A", "B", "C"), rows = 2:7, cols = 2:11, pattern = "112301", byrow = TRUE))make_design(nrows = 8, ncols = 12, design_element_name = make_designpattern( values = c("A", "B", "C"), rows = 2:7, cols = 2:11, pattern = "112301", byrow = TRUE))
This function makes it easy to generate R objects or files that are
created in the vignette examples. Note that this function should not
be counted on to produce the same output across different versions of
gcplyr, as it will be frequently changed to match the examples
in the vignettes.
make_example(vignette, example, dir = ".")make_example(vignette, example, dir = ".")
vignette |
Number of the vignette the example object or file is created in. |
example |
Number of the example the object or file is created in. |
dir |
The directory files should be saved into. |
An R object, or the names of the files if files have been written
This is a function to easily input experimental design elements for later merging with read data
make_tidydesign( nrows = NULL, ncols = NULL, block_row_names = NULL, block_col_names = NULL, wellnames_sep = "", wellnames_colname = "Well", wellnames_Excel = TRUE, lookup_tbl_start = 1, pattern_split = "", colnames_first = FALSE, ... )make_tidydesign( nrows = NULL, ncols = NULL, block_row_names = NULL, block_col_names = NULL, wellnames_sep = "", wellnames_colname = "Well", wellnames_Excel = TRUE, lookup_tbl_start = 1, pattern_split = "", colnames_first = FALSE, ... )
nrows, ncols
|
Number of rows and columns in the plate data |
block_row_names, block_col_names
|
Names of the rows, columns of the plate blockmeasures data |
wellnames_sep |
A |
wellnames_colname |
Header for newly-created column containing the well names |
wellnames_Excel |
If |
lookup_tbl_start |
Value in the lookup table for the split pattern values
that corresponds to the first value in the Lookup table by default is
|
pattern_split |
character to split pattern elements provided in
|
colnames_first |
In the wellnames created by paste-ing the rownames and column names, should the column names come first |
... |
Each
|
Note that either nrows or block_row_names must be provided
and that either ncols or block_col_names must be provided
Examples:
my_example <- make_tidydesign(nrows = 8, ncols = 12,
design_element_name = list(c("Value1", "Value2", "Value3"),
rowstart:rowend, colstart:colend,
"111222333000", TRUE)
To make it easier to pass arguments, use make_designpattern:
my_example <- make_tidydesign(nrows = 8, ncols = 12,
design_element_name = make_designpattern(values = c("L", "G", "C"),
rows = 2:7, cols = 2:11,
pattern = "11223300",
byrow = TRUE))
a tidy-shaped data.frame containing all the design elements
This function generates a list which is compatible to be used as the
method argument to train. This enables users to
call train directly themselves with smooth_data
smoothing functions.
makemethod_train_smooth_data(sm_method, tuneGrid = NULL)makemethod_train_smooth_data(sm_method, tuneGrid = NULL)
sm_method |
Argument specifying which smoothing method should be used. Options include "moving-average", "moving-median", "loess", "gam", and "smooth.spline". |
tuneGrid |
A Note that, when using train, the |
A list that can be used as the method argument to
train. Contains elements:
library, type, prob, fit,
parameters, grid, fit, and predict.
See documentation on using a custom model model in train for more details.
This function is essentially a wrapper for any of dplyr's
mutate-joins (by default, a full_join).
The most typical use of this function is to merge designs with measures
data, or to use the collapse functionality to merge a list of data.frames
into a single data.frame. Merging is done by column names that match
between x and y.
merge_dfs( x, y = NULL, by = NULL, drop = FALSE, collapse = FALSE, names_to = NA, join = "full", warn_morerows = TRUE, ... )merge_dfs( x, y = NULL, by = NULL, drop = FALSE, collapse = FALSE, names_to = NA, join = "full", warn_morerows = TRUE, ... )
x |
First |
y |
Second |
by |
A |
drop |
Should only |
collapse |
A |
names_to |
Column name for where If a value of |
join |
Type of join used to merge
See full_join, left_join, right_join, or inner_join for more details |
warn_morerows |
|
... |
Other arguments to pass to the underlying join function. See full_join, left_join, right_join, or inner_join for options. |
data.frame containing merged output of x and
y
Returns the maxima and minima of the input values.
max_gc(..., na.rm = TRUE, allmissing_NA = TRUE) min_gc(..., na.rm = TRUE, allmissing_NA = TRUE)max_gc(..., na.rm = TRUE, allmissing_NA = TRUE) min_gc(..., na.rm = TRUE, allmissing_NA = TRUE)
... |
|
na.rm |
a |
allmissing_NA |
a |
These functions are wrappers for min and max,
with the additional argument allmissing_NA.
If allmissing_NA = FALSE, identical to min or
max.
If allmissing_NA = TRUE, identical to min or
max except that, in cases where min or
max would return an infinite value and raise a warning because
there are no non-missing arguments, min_gc and
max_gc return NA
These functions use a moving window to smooth data
moving_average( formula = NULL, data = NULL, x = NULL, y = NULL, window_width_n = NULL, window_width = NULL, window_width_n_frac = NULL, window_width_frac = NULL, na.rm = TRUE, warn_nonnumeric_sort = TRUE ) moving_median( formula = NULL, data = NULL, x = NULL, y = NULL, window_width_n = NULL, window_width = NULL, window_width_n_frac = NULL, window_width_frac = NULL, na.rm = TRUE, warn_nonnumeric_sort = TRUE )moving_average( formula = NULL, data = NULL, x = NULL, y = NULL, window_width_n = NULL, window_width = NULL, window_width_n_frac = NULL, window_width_frac = NULL, na.rm = TRUE, warn_nonnumeric_sort = TRUE ) moving_median( formula = NULL, data = NULL, x = NULL, y = NULL, window_width_n = NULL, window_width = NULL, window_width_n_frac = NULL, window_width_frac = NULL, na.rm = TRUE, warn_nonnumeric_sort = TRUE )
formula |
Formula specifying the |
data |
|
x |
A |
y |
A |
window_width_n |
Number of data points wide the moving window is (therefore, must be an odd number of points) |
window_width |
Width of the moving window (in units of |
window_width_n_frac |
Width of the window (as a fraction of the total number of data points). |
window_width_frac |
Width of the window (as a fraction of the range of
|
na.rm |
|
warn_nonnumeric_sort |
|
Either x and y or formula and data
must be provided.
Values of NULL or NA will be ignored for any of
window_width_n, window_width,
window_width_n_frac, or window_width_frac
vector of smoothed data, with NA's appended at both ends
This function uses paste to concatenate the same-location entries
of a list of data.frames together (i.e. all the first row-first column
values are pasted together, all the second row-first column values are
pasted together, etc.)
paste_blocks(blocks, sep = "_", nested_metadata = NULL)paste_blocks(blocks, sep = "_", nested_metadata = NULL)
blocks |
Blocks, either a single |
sep |
|
nested_metadata |
A |
If nested_metadata = TRUE (or is inferred to be TRUE), a list
containing a list containing: 1. a data.frame with the
pasted data values from blocks, and 2. a vector with the
pasted metadata values from blocks
If nested_metadata = FALSE (or is inferred to be FALSE), a list
containing data.frame's with the pasted values from
blocks
Predict data by linear interpolation from existing data
predict_interpolation( x, y, newdata, extrapolate_predictions = TRUE, na.rm = TRUE )predict_interpolation( x, y, newdata, extrapolate_predictions = TRUE, na.rm = TRUE )
x |
A |
y |
A |
newdata |
A |
extrapolate_predictions |
Boolean indicating whether values of |
na.rm |
|
A vector of response values for each predictor value in
newdata
This function uses write.table to print the input data.frame
in a nicely-formatted manner that is easy to read
print_df(x, col.names = FALSE, row.names = FALSE)print_df(x, col.names = FALSE, row.names = FALSE)
x |
The |
col.names |
Boolean for whether column names should be printed |
row.names |
Boolean for whether row names should be printed |
A function that reads blocks into the R environment
read_blocks( files, filetype = NULL, startrow = NULL, endrow = NULL, startcol = NULL, endcol = NULL, sheet = NULL, metadata = NULL, block_names = NULL, block_names_header = "block_name", block_names_dot = FALSE, block_names_path = TRUE, block_names_ext = FALSE, header = NA, sider = NA, wellnames_numeric = FALSE, na.strings = c("NA", ""), extension, block_name_header, ... )read_blocks( files, filetype = NULL, startrow = NULL, endrow = NULL, startcol = NULL, endcol = NULL, sheet = NULL, metadata = NULL, block_names = NULL, block_names_header = "block_name", block_names_dot = FALSE, block_names_path = TRUE, block_names_ext = FALSE, header = NA, sider = NA, wellnames_numeric = FALSE, na.strings = c("NA", ""), extension, block_name_header, ... )
files |
A |
filetype |
(optional) the type(s) of the files. Options include: "csv", "xls", or "xlsx". "tbl" or "table" to use read.table to read the file, "csv2" to use read.csv2, "delim" to use read.delim, or "delim2" to use read.delim2. If none provided, |
startrow, endrow, startcol, endcol
|
(optional) the rows and columns where
the measures data are located in Can be a If not provided, data is presumed to begin on the first row and column of the file(s) and end on the last row and column of the file(s). |
sheet |
(optional) If data is in .xls or .xlsx files, which sheet it is located on. Defaults to the first sheet if not specified |
metadata |
(optional) non-density data that should be
associated with each read blockmeasures. A named In the former case, each In the latter case, the first |
block_names |
(optional) |
block_names_header |
The name of the metadata field containing the
|
block_names_dot |
If |
block_names_path |
If |
block_names_ext |
If |
header |
|
sider |
|
wellnames_numeric |
If row names and column names are not provided in the
input If If |
na.strings |
A |
extension |
Deprecated, use |
block_name_header |
Deprecated, use |
... |
Other arguments passed to read.csv, read_xls, read_xlsx, or read.table |
For metadata, read_blocks can handle an arbitrary number of additional
pieces of information to extract from each blockcurve file as metadata.
These pieces of information are specified as a named list of vectors
where each vector is the c(row, column) where the information is to be
pulled from in the input files.
This metadata is returned as the second list element of each
blockcurve, e.g.:
[[1]]
[1] data #1
[2] metadata
[2][1] name #1
[2][2] date-time #1
[2][3] temp #1
[[2]]
[1] data #2
[2] metadata
[2][1] name #2
[2][2] date-time #2
[2][3] temp #2
...
Calling uninterleave on the output of read_blocks works on block data
and the associated metadata because uninterleave operates on the highest
level entries of the list (the [[1]] [[2]] level items),
leaving the meta-data associated with the block data
trans_block_to_wide integrates this metadata into the
wide-shaped data.frame it produces
A list where each entry is a list containing the block data.frame
followed by the block_names (or filenames, if block_names is not
provided) and any specified metadata.
A function that imports tidy-shaped files into R. Largely acts as a wrapper for read.csv, read_xls, read_xls, or read_xlsx, but can handle multiple files at once and has additional options for taking subsets of rows/columns rather than the entire file and for adding filename or run names as an added column in the output.
read_tidys( files, filetype = NULL, startrow = NULL, endrow = NULL, startcol = NULL, endcol = NULL, sheet = NULL, run_names = NULL, run_names_header = NULL, run_names_dot = FALSE, run_names_path = TRUE, run_names_ext = FALSE, na.strings = c("NA", ""), extension, names_to_col, ... )read_tidys( files, filetype = NULL, startrow = NULL, endrow = NULL, startcol = NULL, endcol = NULL, sheet = NULL, run_names = NULL, run_names_header = NULL, run_names_dot = FALSE, run_names_path = TRUE, run_names_ext = FALSE, na.strings = c("NA", ""), extension, names_to_col, ... )
files |
A |
filetype |
(optional) the type(s) of the files. Options include: "csv", "xls", or "xlsx". "tbl" or "table" to use read.table to read the file, "csv2" to use read.csv2, "delim" to use read.delim, or "delim2" to use read.delim2. If none provided, |
startrow, endrow, startcol, endcol
|
(optional) the rows and columns where
the data are located in Can be a If not provided, data is presumed to begin on the first row and column of the file(s) and end on the last row and column of the file(s). |
sheet |
The sheet of the input files where data is located (if input files are .xls or .xlsx). If not specified defaults to the first |
run_names |
Names to give the tidy files read in. By default uses the
file names if not specified. These names may be added
to the resulting |
run_names_header |
Should the run names (provided in If If If If |
run_names_dot |
If |
run_names_path |
If |
run_names_ext |
If |
na.strings |
A |
extension |
Deprecated, use |
names_to_col |
Deprecated, use |
... |
Other arguments passed to read.csv, read_xls, read_xlsx, or read.table sheet |
startrow, endrow, startcol, endcol,
sheet and filetype can either be a single value that
applies for all files or vectors or lists the same length as files
Note that the startrow is always assumed to be a header
A data.frame containing a single tidy data.frame, or
A list of tidy-shaped data.frames named by filename
A function that imports widemeasures in files into the R environment
read_wides( files, filetype = NULL, startrow = NULL, endrow = NULL, startcol = NULL, endcol = NULL, header = TRUE, sheet = NULL, run_names = NULL, run_names_header = "file", run_names_dot = FALSE, run_names_path = TRUE, run_names_ext = FALSE, metadata = NULL, na.strings = c("NA", ""), extension, names_to_col, ... )read_wides( files, filetype = NULL, startrow = NULL, endrow = NULL, startcol = NULL, endcol = NULL, header = TRUE, sheet = NULL, run_names = NULL, run_names_header = "file", run_names_dot = FALSE, run_names_path = TRUE, run_names_ext = FALSE, metadata = NULL, na.strings = c("NA", ""), extension, names_to_col, ... )
files |
A |
filetype |
(optional) the type(s) of the files. Options include: "csv", "xls", or "xlsx". "tbl" or "table" to use read.table to read the file, "csv2" to use read.csv2, "delim" to use read.delim, or "delim2" to use read.delim2. If none provided, |
startrow, endrow, startcol, endcol
|
(optional) the rows and columns where
the data are located in Can be a If not provided, data is presumed to begin on the first row and column of the file(s) and end on the last row and column of the file(s). |
header |
|
sheet |
The sheet of the input files where data is located (if input files are .xls or .xlsx). If not specified defaults to the first sheet |
run_names |
Names to give the widemeasures read in. By default uses the file names if not specified |
run_names_header |
Should the run names (provided in |
run_names_dot |
If |
run_names_path |
If |
run_names_ext |
If |
metadata |
(optional) non-spectrophotometric data that should be
associated with each read widemeasures. A named In the former case, each In the latter case, the first |
na.strings |
A |
extension |
Deprecated, use |
names_to_col |
Deprecated, use |
... |
Other arguments passed to read.csv, read_xls, read_xlsx, or read.table |
startrow, endrow, startcol, endcol, sheet and filetype
can either be a single value that applies for all files or
vectors or lists the same length as files,
A data.frame containing a single widemeasures, or
A list of widemeasures named by filename
This function is primarily a wrapper for separate, which
turns a single character column into multiple columns
separate_tidy( data, col, into = NULL, sep = "_", coerce_NA = TRUE, na.strings = "NA", message_inferred_into = TRUE, ... )separate_tidy( data, col, into = NULL, sep = "_", coerce_NA = TRUE, na.strings = "NA", message_inferred_into = TRUE, ... )
data |
A |
col |
Column name or position |
into |
A If |
sep |
Separator between columns passed to separate: If If |
coerce_NA |
|
na.strings |
A |
message_inferred_into |
|
... |
Other arguments passed to separate |
A data.frame containing new columns in the place of col
This function calls other functions to smooth growth curve data
smooth_data( ..., x = NULL, y = NULL, sm_method, subset_by = NULL, return_fitobject = FALSE, warn_ungrouped = TRUE, warn_gam_no_s = TRUE )smooth_data( ..., x = NULL, y = NULL, sm_method, subset_by = NULL, return_fitobject = FALSE, warn_ungrouped = TRUE, warn_gam_no_s = TRUE )
... |
Arguments passed to loess, gam, moving_average, moving_median, or smooth.spline. Typically includes tuning parameter(s), which in some cases are required. See Details for more information. |
x |
An (often optional) |
y |
A |
sm_method |
Argument specifying which smoothing method should be used to smooth data. Options include "moving-average", "moving-median", "loess", "gam", and "smooth.spline". |
subset_by |
An optional This provides an internally-implemented approach similar to group_by and mutate |
return_fitobject |
|
warn_ungrouped |
|
warn_gam_no_s |
|
For moving_average and moving_median,
passing window_width or window_width_n via
... is required. window_width sets the width
of the moving window in units of x, while
window_width_n sets the width in units of number
of data points. Larger values for either will produce more
"smoothed" data.
For loess, the span argument sets the fraction of
data points that should be included in each calculation. It's
typically best to specify, since the default of 0.75 is often
too large for growth curves data. Larger values of span
will produce more "smoothed" data
For gam, both arguments to gam and
s can be provided via .... Most frequently,
the k argument to s sets the number of
"knots" the spline-fitting can use. Smaller values of k will
be more "smoothed".
When using sm_method = "gam", advanced users may also modify
other parameters of s, including the smoothing basis
bs. These bases can be thin plate (bs = "tp",
the default), cubic regressions (bs = "cr"), or many other
options (see s). I recommend leaving the default
thin plate regressions, whose main drawback is that they are
computationally intensive to calculate. For growth curves data,
this is unlikely to be relevant.
As an alternative to passing y, for more advanced needs
with loess or gam, formula and data
can be passed to smooth_data via the ... argument
(in lieu of y).
In this case, the formula should specify the response (e.g. density)
and predictors. For gam smoothing, the formula should
typically be of the format: y ~ s(x), which uses
s to smooth the data. The data argument should be a
data.frame containing the variables in the formula.
In such cases, subset_by can still be specified as a vector
with length nrow(data)
If return_fitobject == FALSE:
A vector, the same length as y, with the now-smoothed y values
If return_fitobject == TRUE:
A list the same length as unique(subset_by) where each element is
an object of the same class as returned by the smoothing method
(typically a named list-like object)
Takes a set of inputs that is sufficient information to infer a line
and then returns information not provided (either the slope, an x point
on the line, or a y point on the line)
solve_linear( x1, y1, x2 = NULL, y2 = NULL, x3 = NULL, y3 = NULL, m = NULL, named = TRUE )solve_linear( x1, y1, x2 = NULL, y2 = NULL, x3 = NULL, y3 = NULL, m = NULL, named = TRUE )
x1, y1
|
A point on the line |
x2, y2
|
An additional point on the line |
x3, y3
|
An additional point on the line |
m |
The slope of the line |
named |
|
Note that there is no requirement that
x1 < x2 < x3: the points can be in any order
along the line.
solve_linear works with vectors of all inputs to solve
multiple lines at once, where the ith element of each
argument corresponds to the ith output. Note that all
lines must be missing the same information. Input vectors
will be recycled as necessary.
A named vector with the missing information from the line:
If m and x2 are provided, y2 will be returned
If m and y2 are provided, x2 will be returned
If x2 and y2 are provided, but neither x3 nor
y3 are provided, m will be returned
If x2 and y2 are provided and one of x3 or
y3 are provided, the other (y3 or x3) will be
returned
These functions take a vector of y values and identify points where
the y values cross some threshold y value.
find_threshold_crosses( y, x = NULL, threshold, return = "index", return_rising = TRUE, return_falling = TRUE, return_endpoints = TRUE, subset = NULL, na.rm = TRUE ) first_below( y, x = NULL, threshold, return = "index", return_endpoints = TRUE, ... ) first_above( y, x = NULL, threshold, return = "index", return_endpoints = TRUE, ... )find_threshold_crosses( y, x = NULL, threshold, return = "index", return_rising = TRUE, return_falling = TRUE, return_endpoints = TRUE, subset = NULL, na.rm = TRUE ) first_below( y, x = NULL, threshold, return = "index", return_endpoints = TRUE, ... ) first_above( y, x = NULL, threshold, return = "index", return_endpoints = TRUE, ... )
y |
|
x |
Optional |
threshold |
Threshold |
return |
One of If If |
return_rising |
|
return_falling |
|
return_endpoints |
|
subset |
A If |
na.rm |
|
... |
(for |
find_threshold_crosses returns a vector corresponding to all the
threshold crossings.
first_above returns only the first time the y values
rise above the threshold, so is a shortcut for
find_threshold_crosses(return_rising = TRUE, return_falling = FALSE)[1]
first_below returns only the first time the y values
fall below the threshold, so is a shortcut for
find_threshold_crosses(return_rising = FALSE, return_falling = TRUE)[1]
If return = "index", the returned value(s) are the indices
immediately following threshold crossing(s)
If return = "x", the returned value(s) are the x value(s)
corresponding to threshold crossing(s)
If no threshold-crossings are detected that meet the criteria, will
return NA
A function that converts numbers into base-26 Excel-style letters
to_excel(x)to_excel(x)
x |
A |
A vector of letters in Excel-style base-26 format
This function is based on train, which runs models (in our case different smoothing algorithms) on data across different parameter values (in our case different smoothness parameters).
train_smooth_data( ..., x = NULL, y = NULL, sm_method, preProcess = NULL, weights = NULL, metric = ifelse(is.factor(y), "Accuracy", "RMSE"), maximize = ifelse(metric %in% c("RMSE", "logLoss", "MAE", "logLoss"), FALSE, TRUE), trControl = caret::trainControl(method = "cv"), tuneGrid = NULL, tuneLength = ifelse(trControl$method == "none", 1, 3), return_trainobject = FALSE )train_smooth_data( ..., x = NULL, y = NULL, sm_method, preProcess = NULL, weights = NULL, metric = ifelse(is.factor(y), "Accuracy", "RMSE"), maximize = ifelse(metric %in% c("RMSE", "logLoss", "MAE", "logLoss"), FALSE, TRUE), trControl = caret::trainControl(method = "cv"), tuneGrid = NULL, tuneLength = ifelse(trControl$method == "none", 1, 3), return_trainobject = FALSE )
... |
Arguments passed to smooth_data. These arguments cannot overlap with any of those to be tuned. |
x |
A |
y |
A |
sm_method |
Argument specifying which smoothing method should be used. Options include "moving-average", "moving-median", "loess", "gam", and "smooth.spline". |
preProcess |
A |
weights |
A |
metric |
A |
maximize |
A |
trControl |
A |
tuneGrid |
A |
tuneLength |
An |
return_trainobject |
A |
See train for more information.
The default method is k-fold cross-validation
(trControl = caret::trainControl(method = "cv")).
For less variable, but more computationally costly, cross-validation,
users may choose to increase the number of folds. This can be
done by altering the number argument in
trainControl, or by setting method = "LOOCV"
for leave one out cross-validation where the number of folds is
equal to the number of data points.
For less variable, but more computationally costly, cross-validation,
users may alternatively choose method = "repeatedcv" for
repeated k-fold cross-validation.
For more control, advanced users may wish to call
train directly, using
makemethod_train_smooth_data to specify the method
argument.
If return_trainobject = FALSE (the default), a data.frame
with the values of all tuning parameter combinations and the
training error rate for each combination (i.e. the results
element of the output of train).
If return_trainobject = TRUE, the output of train
Takes blocks and returns them in a wide format
trans_block_to_wide( blocks, wellnames_sep = "", nested_metadata = NULL, colnames_first = FALSE )trans_block_to_wide( blocks, wellnames_sep = "", nested_metadata = NULL, colnames_first = FALSE )
blocks |
Blocks, either a single |
wellnames_sep |
|
nested_metadata |
A |
colnames_first |
In the wellnames created by paste-ing the rownames and column names, should the column names come first? |
A single wide-shaped data.frame
Essentially a wrapper for pivot_longer that works on both a
single wide-shaped data.frame as well as a list of wide-shaped data.frame's
trans_wide_to_tidy( wides, data_cols = NA, id_cols = NA, names_to = "Well", values_to = "Measurements", values_to_numeric = TRUE, ... )trans_wide_to_tidy( wides, data_cols = NA, id_cols = NA, names_to = "Well", values_to = "Measurements", values_to_numeric = TRUE, ... )
wides |
A single wide-shaped |
data_cols, id_cols
|
Specifies which columns have data vs are ID's
(in pivot_longer parlance). Each can be
a single Entries that are If neither |
names_to, values_to
|
Specifies the output column names created by
pivot_longer. Each can be provided
as |
values_to_numeric |
|
... |
Other arguments to be passed to pivot_longer
Note that including |
Pivoted longer data.frame (if wides is a single data.frame)
or list of pivoted longer data.frames (if wides is
a list of data.frames)
Takes a list that is actually interleaved elements from multiple sources
and uninterleaves them into the separate sources. For instance, a list of
blockmeasures that actually corresponds to two different plates can be
split into two lists, each of the blockmeasures corresponding to a single
plate. uninterleave assumes that the desired sub-groups are perfectly
interleaved in the input (e.g. items belong to sub-groups 1,2,3,1,2,3,...)
uninterleave(interleaved_list, n)uninterleave(interleaved_list, n)
interleaved_list |
A |
n |
How many output sub |
A list of lists of R objects
Determines the location, i.e. index, of the (first) minimum or maximum of
a numeric (or logical) vector.
which_min_gc(x, empty_NA = TRUE) which_max_gc(x, empty_NA = TRUE)which_min_gc(x, empty_NA = TRUE) which_max_gc(x, empty_NA = TRUE)
x |
|
empty_NA |
|
These functions are wrappers for which.min and which.max,
with the additional argument empty_NA.
If empty_NA = FALSE, identical to which.min or
which.max
If empty_NA = TRUE, identical to which.min or
which.max except that, in cases where which.min or
which.max would return integer(0), which_min_gc and
which_max_gc return NA
This function writes block-shaped lists (as created by
read_blocks or make_design) to csv files, including
both data and metadata in a variety of output formats
write_blocks( blocks, file, output_format = "multiple", block_name_location = NULL, block_name_header = "block_name", paste_sep = "_", filename_sep = "_", na = "", dir = NULL, ... )write_blocks( blocks, file, output_format = "multiple", block_name_location = NULL, block_name_header = "block_name", paste_sep = "_", filename_sep = "_", na = "", dir = NULL, ... )
blocks |
|
file |
A file name is required when A file name can be specified when File names can be specified when |
output_format |
One of "single", "pasted", "multiple". "single" will write all blocks into a single csv file, with an empty row between successive blocks. "pasted" will paste all blocks together using a
"multiple" will write each block to its own csv file. |
block_name_location |
Either If If 'filename', the If 'file', the |
block_name_header |
The name of the field containing the
|
paste_sep |
When |
filename_sep |
What character will be used to paste together
filenames when |
na |
The |
dir |
The directory that file(s) will be written into. When
|
... |
Other arguments passed to write.table |
Nothing, but R objects are written to files