Write a function that given a data frame returns

Assignment Help Computer Engineering
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

Reference no: EM131884118

Questions Cloud

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.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Choose one of the ubuntu shells and discuss how you can

choose one of the ubuntu shells and discuss how you can perform a minimum of 20 commands or functions. these commands

  Determine the objects needed for the design

It is used to identify and determine the objects needed for the design. Polymorphism is the ability for classes to provide different implementations of methods.

  Prepare a multithreaded code breaking program

Prepare a  multithreaded code breaking program. You have been provided 3 files that contain text that have been  encrypted using a Caeser cypher scheme.

  How will replacing the air in the gap by argon

Consider a double-pane window whose air space is flashed and filled with argon gas. How will replacing the air in the gap by argon affect (a) convection.

  Give any relationship that may exist between the principle

You are to explore the principles of data abstraction, inheritance and dynamic binding. Use the Library to get started on finding resources. Take each term and describe it.

  Create a table that shows every time signals are converted

Create a table (or draw a figure) that shows every time data or signals are converted to a different form in this process.

  Recommend the proper audit controls to be employed

Analyze proper physical access control safeguards and provide sound recommendations to be employed in the registrar's office. Recommend the proper audit controls to be employed in the registrar's office.

  Implement stored procedure and function

CSCI835 Database systems - Create a view CUSTOMERACCOUNTS that contains customer BSB#, customer#, name, account#, type and balance. Display the results

  What is the nestlet number on each side of the passage

Consider fully developed, constant-property laminar flow between parallel planes with constant heat rate per unit of length and a fully developed temperature.

  What kind of control structure would you use

What kind of control structure would you use to decide which segment a given letter falls into and to print out the corresponding digit?

  Why term would be important and relevant in the design

For each of the following items, explain what the term refers to and why it would be important and relevant in the design of a practical programming language.

  How to break the stream into tokens

Your must tokenize the entire input stream, using the lexical specification below to dictate how to break the stream into tokens.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd