Question: For getting information about each column of a data frame, use sapply(). For example, the following applies the function class() to each column of the

For getting information about each column of a data frame, use sapply(). For example, the

following applies the function class() to each column of the data frame ant111b.

library(DAAG)

sapply(ant111b, class)

  • Functions that may be used to get information about data frames include str(), dim(), row.names() and names(). Try each of these functions with the data frames allbacks, ant111b and tinting (all in DAAG).
  • For columns in the data frame tinting that are factors, use table() to tabulate the number of values for each level. I only need the answer to this one. I tried table(tinting) and received the following error - Error in table(tinting) : attempt to make a table with >= 2^31 elements

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 General Management Questions!