wrappers.F.C: Wrapper for simulation programs in Fortran and C

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Call to programs in Fortran and C using .Fortran and .C interfaces

Usage

1
2
3
4
5
cerio.F(x, fileprefix)
semi.F(x, fileprefix)
zelig.F(x, fileprefix)
river.C(x, fileprefix)
forsucc.C(x, fileprefix)

Arguments

x

work directory name

fileprefix

prefix to build filename

Details

Programs written in Fortran and C are executed from an interface R function. These are dynamically loaded by useDynLib(seem) when loading seem. Alternatively, this dll can be loaded before using those programs by executing function dyn.load() in the following manner >dyn.load(paste(.libPaths(),"/seem/libs/i386/seem.dll",sep=""))

Value

fileout is the name of output file generated by the Fortran or C program and renamed according to arguments to the wrapper.

Note

Alternatively, you can add dyn.load to the Rprofile.site file to load seem.dll automatically every time you start R.

The zelig model used here is based on the 2.3 version by D.L. Urban.

Author(s)

Miguel F. Acevedo Acevedo@unt.edu

References

Acevedo M.F. 2012. Simulation of Ecological and Environmental Models. CRC Press.

See Also

Interface functions .Fortran, .C, Output processor functions read.plot.cerio.out, read.plot.semi.out, read.plot.zelig.out, read.plot.river.out, read.plot.forsucc.out

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Not run: 
is.loaded("cerio", PACKAGE="seem")

fileout <- cerio.F("chp10","cerio")
x <- read.plot.cerio.out(fileout,pdfout=TRUE)

is.loaded("river", PACKAGE="seem")
fileout <- river.C("chp14","river-sens")
x <- read.plot.river.out(fileout,sens=TRUE)

spp <- c("Post oak", "Black jack oak", "Winged elm", "GreenAsh",
         "CedarElm", "Hackberry", "BurOak", "Pecan")
grp1 <- c(1:3); grp2 <- c(4:8) #upland 3 spp and bottomland 5 spp

is.loaded("zelig", PACKAGE="seem")
fileout <- zelig.F("chp16","gbc")
x <- read.plot.zelig.out(fileout,spp, grp1, grp2)

fileout <- forsucc.C("chp16","forsucc") # forsucc is fileprefix
x <- read.plot.forsucc.out(fileout, sens=FALSE)

spp <- c("Role1", "Role2", "Role3", "Role4")
fileprefix <- "rolesm"; label <- "Semi-Markov Order 1" 
fileout <- semi.F("chp16",fileprefix)
x <- read.plot.semi.out(fileout, spp, label)


## End(Not run)

seem documentation built on April 14, 2017, 9:12 p.m.