Learn R Programming

RandomFields (version 3.1.16)

RFgui: Graphical User Interface For Fitting Covariance Models And Variograms

Description

This is a nice instructive graphical tool useful in particular for teaching classes

Usage

RFgui(data, x, y, same.algorithm = TRUE, ev, bin = NULL, xcov, ycov, sim_only1dim=FALSE, wait = 0, ...)

Arguments

data
see RFempiricalvariogram. If data is given, the empirical variogram is shown
x
a sequence of the locations of the simulated process; if not given, x is determined by data and if data is not given by default values
y
a sequence of numbers if a simulation on $R^d$ is performed. Default is y = x; see x for details.
same.algorithm
Force the picture being simulated with the same algorithm so that the pictures are always directly comparable. The disadvantage is that some models are simulated only (very) approximatively.
ev
instead of the data, the emprirical variogram itself might be passed
bin
only considered if data is given. See RFempiricalvariogram for details.
xcov
sequence of the locations where the covariance function is plotted
ycov
Only for anisotropic models. sequence of the locations where the covariance function is also plotted
sim_only1dim
Logical. The argument determines whether a process should be simulated on the line or on the plane
wait
integer. See details.
...
further options and control arguments for the simulation that are passed to and processed by RFoptions.

Value

If wait < 0 the the function returns NULL else it returns the last chosen RMmodel.If wait < 0, a side effect effect of RFgui is the creation of the variable RFgui.model on .GlobalEnv.

Details

If wait is negative the xterm does not wait for the tkltk-window to be finished. Further the variable RFgui.model is created in the environment .GlobalEnv and contains the currently chosen variable in the gui. RFgui always return NULL.

If wait is non-negative the xterm waits for the tkltk-window to be finished. RFgui returns invisibly the last chosen model (or NULL if no model has been chosen). RFgui idles a lot when wait=0. It idles less for higher values by sleeping about wait microseconds. Of course the handling in the tkltk window get slower also. Reasonable values for wait are within [0,1000].

same.alg = TRUE is equivalent to setting circulant.trials=1, circulant.simu_method = "RPcirculant", circulant.force=TRUE, circulant.mmin=-2.

See Also

soil for a further example

Examples

Run this code
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again
RFgui()

Run the code above in your browser using DataLab