"fv").
as.fv(x)
"as.fv"(x)
"as.fv"(x)
"as.fv"(x)
"as.fv"(x)
"as.fv"(x)
"as.fv"(x)
"as.fv"(x)
"as.fv"(x)"fv" (see fv.object).
x, that
could be interpreted as the values of a function,
into a function value table (object of the class "fv"
as described in fv.object). This object can then
be plotted easily using plot.fv. The dataset x may be any of the following:
"fv";
"fasp", representing an array of
"fv" objects.
"minconfit", giving the results
of a minimum contrast fit by the command mincontrast.
The
"kppm", representing a fitted
Cox or cluster point process model, obtained from the
model-fitting command kppm;
"dppm", representing a fitted
determinantal point process model, obtained from the
model-fitting command dppm;
"bw.optim", representing an optimal
choice of smoothing bandwidth by a cross-validation method, obtained
from commands like bw.diggle.
The function as.fv is generic, with methods for each of the
classes listed above. The behaviour is as follows:
x is an object of class "fv", it is
returned unchanged.
x is a matrix or data frame,
the first column is interpreted
as the function argument, and subsequent columns are interpreted as
values of the function computed by different methods.
x is an object of class "fasp"
representing an array of "fv" objects,
these are combined into a single "fv" object.
x is an object of class "minconfit",
or an object of class "kppm" or "dppm",
the result is a function table containing the
observed summary function and the best fit summary function.
x is an object of class "bw.optim",
the result is a function table of the optimisation criterion
as a function of the smoothing bandwidth.
r <- seq(0, 1, length=101)
x <- data.frame(r=r, y=r^2)
as.fv(x)
Run the code above in your browser using DataLab