Reference no: EM131884118
Homework - This homework is to be completed in R. Please use basic code for code beginner!
Data frames. Use the diamonds data frame from the ggplot2 library to help you write the following functions.
1. Write a function that given a data frame extracts the column names and prints the names one column name per line to the console.
2. Write a function that given a data frame returns the type of each column (numeric, factor, logical, etc.) and prints the type to the console.
3. Write a function that given a data frame will loop through each numeric column and print the name and mean of that column.
4. Write a function that given a data frame will loop through each factor column and prints a frequency table for that column (Hint: look at the table() function).
5. Write a function that given a data frame will loop through each column and print the column name, the most common element and the number of times that element occurs. Note: If there are multiple elements that appear the same number of times only return one of them.
Attachment:- Assignment Files.rar
|
What was reborn during the renaissance
: Renaissance means "rebirth." What was reborn during the Renaissance and what was the source of the inspiration for the Renaissance? Discuss.
|
|
Identify areas of the articles of incorporation
: Identify areas of the articles of incorporation to provide the client with guidance on, also provide the steps for your client to incorporate.
|
|
Define and summarize the c form of a corporation
: Define and summarize the C form of a corporation - include a link to the IRS page where the reader can review this specific information.
|
|
What is your specific argument about the narrowed topic
: What is your specific argument about the narrowed topic? Why does this matter to you and why should it matter to your audience?
|
|
Write a function that given a data frame returns
: Write a function that given a data frame returns the type of each column (numeric, factor, logical, etc.) and prints the type to the console
|
|
What are the excess reserves
: Suppose that the reserve ratio is .25, and that a bank has actual reserves of $15,000, loans of $40,000, and demand deposits of $50,000.
|
|
Bottling plant by purchasing new bottling machine
: Crown Cola is considering expanding its bottling plant by purchasing a new bottling machine. Below is information on the expansion project
|
|
Why should the audience listen to your speech
: Why should the audience listen to your speech? Make it personal to each of them. What type of research have you done to establish credibility?
|
|
Security that represents portfolio of individual stocks
: An Exchange Traded Fund? (ETF) is a security that represents a portfolio of individual stocks.
|