How to find out the log value of each element of vectors given below
(1, 8, 2, 6, 3, 8, 5, 5, 5, 5)
Let us assign to a variable x
x=c(1, 8, 2, 6, 3, 8, 5, 5, 5, 5)
To find out the log value of each element, we cna use the following
log(x[1:9])
Output
[1] 0.0000000 2.0794415 0.6931472 1.7917595 1.0986123 2.0794415
[7] 1.6094379 1.6094379 1.6094379