x with the elements:1, 4, -7, 11, NA, 9, 2, 1, NA, 1, 4, 0
> [1] 0.0000000 1.3862944 NaN 2.3978953 NA 2.1972246 0.6931472
> [8] 0.0000000 NA 0.0000000 1.3862944 -Inf
a = "This is",b = "a concatenated",c = "string".d that is This is a concatenated string. Print d.> [1] "This is a concatenated string"
g with the values:T, T, T, T, F, T, T, T, F, T, T, T.
x refers to the one created in Question 1. Complete the following tasks:g, create a variable called z that is the sum of the non-NA values in x. Print z.g to F, and using g, compute the natural log of all the values that are at least 0 in x. Print the result.> [1] 26
> [1] 0.0000000 1.3862944 2.3978953 2.1972246 0.6931472 0.0000000 0.0000000
> [8] 1.3862944 -Inf
rep() function (We mentioned in chapter 2), create a vector j that consists of1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
k that consist of1, 1, 2, 2, 3, 3, 4, 4, 5, 5.
seq(), create a vector q that consist of0.0000000, 0.5555556, 1.1111111, 1.6666667, 2.2222222,
2.7777778, 3.3333333, 3.8888889, 4.4444444, 5.0000000.
j, k, and q.> [1] 14.93194