Question: In R studio I know how to identify class attribute() function Identify the class of the following objects. For each object, also state whether the

In R studio I know how to identify class attribute() function Identify the class of the following objects. For each object, also state whether the class is explicitly or implicitly defined.

i. foo <- array(data=1:36,dim=c(3,3,4))

ii. bar <- as.vector(foo)

iii. baz <- as.character(bar)

iv. qux <- as.factor(baz)

v. quux <- bar+c(-0.1,0.1)

b. For each object defined in (a), find the sum of the result of calling is.numeric and is.integer on it separately. For example, is.numeric(foo)+is.integer(foo) would compute the sum for (i). Turn the collection of five results into a factor with levels 0, 1, and 2, identified by the results themselves. Compare this factor vector with the result of coercing it to a numeric vector.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!