Apply vachette transformations

apply_transformations(vachette_data, ...)

# S3 method for class 'vachette_data'
apply_transformations(
  vachette_data,
  tol.end = 0.001,
  tol.noise = 1e-08,
  step.x.factor = 1.5,
  ngrid.fit = 100,
  window = 17,
  log_file = NULL,
  ...
)

Arguments

vachette_data

object of class vachette_data

...

Additional arguments

tol.end

numeric; Relative tolerance to determine last x open end reference

tol.noise

numeric; Relative tolerance for landmark determination typical curves

step.x.factor

numeric; x-axis extension factor to search for last x, i.e., to determine where close enough to asymptote

ngrid.fit

numeric; number of grid points in last query segment for matching last reference segment

window

integer; size (gridpoints) of Savitzky Golay smoothing window for landmark position determination

log_file

character; File path to direct console output e.g., "log.txt"

Value

vachette_data object containing a list of vachette-transformed data.frames

Examples

obs <- read.csv(system.file(package = "vachette", "examples", "iv-obs.csv"))
typ <- read.csv(system.file(package = "vachette", "examples", "iv-typ-minmax.csv"))

vd <- vachette_data(
  obs.data = obs,
  typ.data = typ,
  covariates = c(WT = 70),
  mappings = c(OBS = "DV", x = "time"),
  model.name  = "IV"
 )
#> `EVID` column found in obs.data, creating `dosenr` column in data for corresponding ref.dosenr value
#> `EVID` column found in typ.data, creating `dosenr` column in data for corresponding ref.dosenr value

 vd <- apply_transformations(vd)
#> 
#> ----------------------------------------------------------
#> --------------------- i.ucov =  1 ----------------------
#>  ucov WT region region.type ref    1 30      1        open  No
#> ----------------------------------------------------------
#> Remove noisy ends of the reference and query curves, if applicable
#> Some obs cannot be associated with query curve
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> No minimum or maximum detected
#> Points kept in y-range of 2.5% to 97.5% only
#> Polynomial order for open end curve fitting = 45
#> Searched for: inflec
#> Returned: NA
#> No inflection point found
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> No minimum or maximum detected
#> Points kept in y-range of 2.5% to 97.5% only
#> Polynomial order for open end curve fitting = 70
#> Searched for: inflec
#> Returned: NA
#> No inflection point found
#> First and last landmark available only
#> Removing 0 observations for i.ucov=1
#> No landmarks detected, x=0 assumed first landmark
#> Optimized last segment x.scaling 0.5163
#> 
#> Reference
#>       x  type            y1   0.1 start 1.960397e+012 102.0   end 2.777013e-08
#> 
#> Query
#>         x  type        y1   0.100 start 19.789242 197.451   end       NA
#> 
#> Zero observations cannot be transformed with proportional error model
#> 6 observations excluded for all i.ucov
#> 
#> ----------------------------------------------------------
#> --------------------- i.ucov =  2 ----------------------
#>  ucov WT region region.type ref    2 70      1        open Yes
#> ----------------------------------------------------------
#> Remove noisy ends of the reference and query curves, if applicable
#> Some obs cannot be associated with reference curve
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> No minimum or maximum detected
#> Points kept in y-range of 2.5% to 97.5% only
#> Polynomial order for open end curve fitting = 45
#> Searched for: inflec
#> Returned: NA
#> No inflection point found
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> Functions 'get_peaks()' and 'get_valeys()' have been deprecated: please use 'peaks()' and 'valleys()', or 'find_peaks()' and 'find_valleys()', instead.
#> No minimum or maximum detected
#> Points kept in y-range of 2.5% to 97.5% only
#> Polynomial order for open end curve fitting = 45
#> Searched for: inflec
#> Returned: NA
#> No inflection point found
#> First and last landmark available only
#> REFERENCE! No need to remove 0 observations for i.ucov=2
#> No landmarks detected, x=0 assumed first landmark
#> Optimized last segment x.scaling 1
#> 
#> Reference
#>       x  type            y1   0.1 start 1.960397e+012 102.0   end 2.777013e-08
#> 
#> Query
#>       x  type            y1   0.1 start 1.960397e+012 102.0   end 2.777013e-08
#> 
#> *** LEFT Extension reference curve by exponential extrapolation ***
#>   >> Applying NO-asymptote reference curve LEFT-side extrapolation
#> 15 observations excluded for all i.ucov