# Error in FUN(newX[, i], …) : argument “Iclo” is missing, with no default

pmv1=function(H,pa,Ta,fcl,Tr,Iclo,M){

Tcl = (35.7 - 0.0275*H + 0.155*Iclo* (H - 0.31*(57.4 - 0.07*H - pa) -
0.42*(H - 58) - 0.0017*M*(58.7 - pa) - 0.0014*M*(34 - Ta)))

hc=(2.4*(Tcl - Ta))

dT= (Tr - 22)

PMV= (4 + (0.303 *exp(-.036*H) + 0.0275)* (6.57 + 0.46*H +.31*pa + 0.0017*H*pa +
0.0014*H*Ta - 4.13 *fcl *(1 + 0.01*dT)*(Tcl - Tr)-hc*fcl *(Tcl - Ta)))

return((PMV-min(PMV))*3/(max(PMV)-min(PMV))-0)

}

----------
d=7

n <- 250

set.seed(0)

X1 <- optimumLHS(n, d)

X1 <- data.frame(X1)

colnames(X1) <- c("H","pa","Ta","fcl","Tr","Iclo","M")


apply(X1, 1,pmv1)


Error in FUN(newX[, i], ...) : argument "Iclo" is missing, with no default

• can you help to share actual formula, PMV= (4 + (0.303 *exp(-.036*H) + 0.0275)* (6.57 + 0.46*H +.31*pa + 0.0017*H*pa + 0.0014*H*Ta - 4.13 *fcl *(1 + 0.01*dT)(Tcl - Tr)-hcfcl *(Tcl - Ta))) – Toros91 Nov 23 '17 at 6:37

pmv1 = function(H,pa,Ta,fcl,Tr,Iclo,M){
Tcl = (35.7 - 0.0275*H + 0.155*Iclo *
(H - 0.31*(57.4 - 0.07*H - pa) -
0.42*(H - 58) - 0.0017*M*(58.7 - pa) -
0.0014*M*(34 - Ta)))

hc=(2.4*(Tcl - Ta))
dT= (Tr - 22)

PMV= (4 + (0.303 *exp(-.036*H) + 0.0275)*
(6.57 + 0.46*H +.31*pa + 0.0017*H*pa + 0.0014*H*Ta - 4.13 *fcl
*((1 + 0.01*dT) * (Tcl - Tr))-fcl *(Tcl - Ta)))
return((PMV-min(PMV))*3/(max(PMV)-min(PMV))-0)
}

d <- 7

n <- 250

set.seed(0)

X1 <- optimumLHS(n, d)
X1 <- data.frame(X1)

#colnames(X1) <- c("H","pa","Ta","fcl","Tr","Iclo","M")
new <- pmv1(X1[,1],X1[,2],X1[,3],X1[,4],X1[,5],X1[,6],X1[,7])


This would do the job.

• Thnaks a lot @Toros91 it worked, you are a big help – Mithun Ghosh Nov 23 '17 at 18:29
• No problem!, I’ve answered the other question too. If you got what you want, please accept the answer. – Toros91 Nov 24 '17 at 0:26
• If the code was helpful, +1 would be appreciated. – Toros91 Jan 23 '18 at 6:25