discretized: Get discretised data

Description Usage Arguments Value See Also Examples

Description

Get the discretised kinetic data or the discretisation settings used. (See do_disc for generating discretised data.)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  ## S4 method for signature 'MOPMX'
disc_settings(object, join = NULL) 
  ## S4 method for signature 'NULL'
disc_settings(object, ...) 
  ## S4 method for signature 'OPMD'
disc_settings(object, join = NULL) 
  ## S4 method for signature 'OPMS'
disc_settings(object, join = NULL) 
  ## S4 method for signature 'character'
disc_settings(object, ...) 
  ## S4 method for signature 'logical'
disc_settings(object, ...) 
  ## S4 method for signature 'numeric'
disc_settings(object, ...) 

  ## S4 method for signature 'MOPMX'
discretized(object, ...) 
  ## S4 method for signature 'OPMD'
discretized(object, full = FALSE,
    in.parens = TRUE, max = opm_opt("max.chars"), ...) 
  ## S4 method for signature 'OPMS'
discretized(object, ...) 

Arguments

object

OPMD, OPMS or MOPMX object. disc_settings methods for other classes are helpers for generating raw settings lists.

full

Logical scalar passed to wells. This and the following arguments affect the names of the resulting vector.

in.parens

Logical scalar also passed to that function.

max

Numeric scalar also passed to that function.

join

Empty or character scalar. Works like the eponymous argument of aggr_settings; see there for details.

...

Optional arguments passed between the methods or to wells.

Value

Logical vector or matrix in the case of discretized, named list in the case of disc_settings. See the examples for details.

See Also

Other getter-functions: aggr_settings, aggregated, anyDuplicated, anyNA, contains, csv_data, dim, duplicated, has_aggr, has_disc, hours, max, measurements, minmax, seq, subset, thin_out, well

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 'OPM' methods
(x <- discretized(vaas_1))[1:3] # => logical vector
stopifnot(is.logical(x), !is.matrix(x), length(x) == dim(x)[2L])
stopifnot(names(x) == colnames(aggregated(vaas_1)))
(x <- discretized(vaas_1, full = TRUE))[1:3] # => with full names
stopifnot(names(x) == colnames(aggregated(vaas_1, full = TRUE)))

# settings
(x <- disc_settings(vaas_1)) # => named list
stopifnot(is.list(x), !is.null(names(x)))
(x <- disc_settings(vaas_1, join = "yaml")) # matrix, one row per plate
stopifnot(is.matrix(x), is.character(x), nrow(x) == 1)

# 'OPMS' methods
(x <- discretized(vaas_4))[, 1:3] # => logical matrix
stopifnot(is.logical(x), is.matrix(x), ncol(x) == dim(x)[2L])
stopifnot(colnames(x) == colnames(aggregated(vaas_1)))

# settings
summary(x <- disc_settings(vaas_4)) # => list of named lists, one per plate
stopifnot(is.list(x), is.null(names(x)), length(x) == length(vaas_4))
stopifnot(duplicated(x)[-1])
(x <- disc_settings(vaas_4, join = "json")) # matrix, one row per plate
stopifnot(is.matrix(x), is.character(x), nrow(x) == 4)

opm documentation built on May 2, 2019, 6:08 p.m.