Tabulate Data Effectively Assessment
- Country :
Australia
Here is the set of questions focuses on writing functions. You can also download a copy of the questions A1-4-WritingFunctions.Rmd
Questions
1. Using the diamond dataset, write a function that states the number of rows and number of columns in a data framein a sentence.
2. Write a function that takes a mean of every column of a dataframe made of numeric values. You may have to subsetthe data to the numeric columns.
3. Write a function that returns an n-way frequency table for each factor in the table (say with a limit of 4 factors).Make it ignore any numeric data - you may have to subset the data.
4. Write a function to do the same job that summary function does for a dataframe - give descriptive statistics suchas min, quantile for 25%, median, mean, quantile for 25%, max and length and do frequency tables for each columnof the dataset. The formatting should to be neat but doesn't have to be exactly the same as the summary function.
5. Write a function that is more useful than summary function such as min, quantile for 25%, median, mean, quantilefor 25%, max , standard deviation, skew, and kurtosis 1) do some simple ASCII plotting such as histogram, linesand boxplot of each numeric column? 2) compare each of the columns in some way.