Description Usage Arguments Examples
Calculate PSF table for variouts thickness values and write the result to specified file
1 | PSFThickVar(outfile = "example-res.csv", Pft = 1e-04, Cvmu = 0.1, Cvcov = 0.5, Di = 2400, tr = c(10, 20), Sa = 100)
|
outfile |
|
Pft |
|
Cvmu |
|
Cvcov |
|
Di |
|
tr |
|
Sa |
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 29 30 31 32 33 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (outfile = "example-res.csv", Pft = 1e-04, Cvmu = 0.1,
Cvcov = 0.5, Di = 2400, tr = c(10, 20), Sa = 100)
{
i <- 0
for (itr in 1:length(tr)) {
i <- i + 1
if (i == 1) {
iflag <- FALSE
}
else {
iflag <- TRUE
}
infile <- system.file("example.csv", package = "PSFCalc")
aa <- read.csv(infile)
aa$Dimu <- Di
aa$trmu <- tr[itr]
aa$Cvmu <- Cvmu
aa$Cvcov <- Cvcov
psfcal <- PSFCalc::PSFControl$new(aa)
psfcal$Adjust(Sa = Sa)
rescalc <- psfcal$PSFEval(Di = Di, tr = tr[itr], Pft = Pft,
Cvmu = Cvmu, Cvcov = Cvcov, Sa = Sa)
options(warn = -1)
write.table(rescalc, outfile, sep = ",", quote = F, row.names = F,
append = iflag)
options(warn = 0)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.