Learn R Programming

zFactor (version 0.1.9)

z.DranchukPurvisRobinson: Dranchuk-Purvis-Robinson correlation

Description

Dranchuk-Purvis-Robinson correlation

Usage

z.DranchukPurvisRobinson(pres.pr, temp.pr, tolerance = 1e-13,
  verbose = FALSE)

Arguments

pres.pr

pseudo-reduced pressure

temp.pr

pseudo-reduced temperature

tolerance

controls the iteration accuracy

verbose

print internal

Examples

Run this code
# NOT RUN {
## calculate for one Tpr curve at a Ppr
z.DranchukPurvisRobinson(pres.pr = 1.5, temp.pr = 2.0)

## For vectors of Ppr and Tpr:
ppr <- c(0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5)
tpr <- c(1.3, 1.5, 1.7, 2)
z.DranchukPurvisRobinson(pres.pr = ppr, temp.pr = tpr)

## create a matrix of z values
tpr2 <- c(1.05, 1.1, 1.2, 1.3)
ppr2 <- c(0.5, 1.0, 1.5, 2, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5)
sk_corr_2 <- createTidyFromMatrix(ppr2, tpr2, correlation = "DPR")
tibble::as_tibble(sk_corr_2)
# }

Run the code above in your browser using DataLab