Saturday 13 April 2019

LR

H = c(151, 174, 138, 186, 128, 136, 179, 163, 152, 131)

W = c(63, 81, 56, 91, 47, 57, 76, 72, 62, 48)

relation = lm(W~H)

# Find weight of a person with height 170.

a = data.frame(H = 170)
result = predict(relation,a)
print(result)

No comments:

Post a Comment