Learn R Programming

growthPheno (version 3.1.12)

validSmoothsFrame: Checks that an object is a valid smooths.frame.

Description

Checks that an object is a smooths.frame of S3-class data.frame that contains the columns Type, TunePar, TuneVal, Tuning, Method, as well as the columns specified by the atttributes of the object, namely individuals and times.

Usage

validSmoothsFrame(object)

Value

TRUE or a character describing why the object

is not a valid smooths.frame.

Arguments

object

a smooths.frame.

Author

Chris Brien

See Also

is.smooths.frame, as.smooths.frame

Examples

Run this code
dat <- read.table(header = TRUE, text = "
Type TunePar TuneVal Tuning Method       ID  DAP   PSA      sPSA
NCSS      df       4   df-4 direct 045451-C   28 57.446 51.18456
NCSS      df       4   df-4 direct 045451-C   30 89.306 87.67343
NCSS      df       7   df-7 direct 045451-C   28 57.446 57.01589
NCSS      df       7   df-7 direct 045451-C   30 89.306 87.01316
")
dat[1:7] <- lapply(dat[1:6], factor)
dat <- as.smooths.frame(dat, individuals = "ID", times = "DAP")
is.smooths.frame(dat)
validSmoothsFrame(dat)

Run the code above in your browser using DataLab