pframe.
pframe(object)
pframe, which is an object of class
data.frame that has the added class attribute
pframe.
Once an object is of class
pframe, it can be given a
parameters attribute. Parameters for the object can then be assigned values using the
parameters or
param functions. A
pframe object can be attached using the
attach.pframe function. The parameters of a pframe can be called by name just like the variables of a data frame.
A pframe may be useful, though not required, for fitting some nonlinear models with
ms and
nls.
# fitting Michaelis and Menten's original data
conc <- c(0.3330, 0.1670, 0.0833, 0.0416,
0.0208, 0.0104, 0.0052)
vel <- c(3.636, 3.636, 3.236, 2.666, 2.114, 1.466, 0.866)
Micmen <- pframe(list(conc=conc, vel=vel))
class(Micmen)
[1] "pframe"
parameters(Micmen)<- list(K= 0.02, Vm = 3.7)
fit <- nls(vel~Vm*conc/(K+conc),Micmen)