Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For the following questions, please use R commands to find solutions when applicable. Please use Jupyter Notebook and submit Notebook File ( . ipynb )
For the following questions, please use commands to find solutions when
applicable. Please use Jupyter Notebook and submit Notebook File ipynb of
your notebook, including all code and results.
Please follow the steps on slides to set up your anaconda. You should be able to
run the class Jupyter notebook successfully.
Try to resolve any issues you may have. I encourage discussion and help each
other on the installation. Google is also a good resource.
It is your job to set up the environment on your computer. I am not familiar with
your computer so I won't do your homework for you.
You will take full responsibility of your dev environment during exams, ie if
your Jupyter doesn't work during exams, you know how to quickly fix it or you
lose time.
The builtin data set islands contains the size of the world's land masses that
exceed square miles. Use sort with the argument decreasingTRUE to
find the seven largest land masses.
For Example, the expected solution is
sortislands decreasingTRUE:
Load the data set primes UsingR This is the set of prime numbers in
How many are there? How many in the range
Load the data set primes UsingR We wish to find all the twin primes. These
are numbers and where both are prime.
Explain what primes returns.If you set length primes explain what primes returns.
Why might primes primes give clues as to what the twin primes
are?
How many twin primes are there in the data set?
For the data set treering, which contains treering widths in dimensionless
units, use an function to answer the following:
How many observations are there?
Find the smallest observation.
Find the largest observation.
How many are bigger than
The data set mandms UsingR contains the targeted color distribution in a
bag of M&Ms as percentages for varies types of packaging. Answer these
questions.
Which packaging is missing one of the six colors?
Which types of packaging have an equal distribution of colors?
Which packaging has a single color that is more likely than all the others? What
color is this?
The imes variable in the data set nymUsingR contains the time to
finish for several participants in the New York City Marathon. Answer these
questions.
How many times are stored in the data set?
What was the fastest time in minutes? Convert this into hours and minutes using
What was the slowest time in minutes? Convert this into hours and minutes using
For the data set rivers, which is the longest river? The shortest?
The data set uspop contains decadebydecade population figures for the
United States from to
Use names and seq to add the year names to the data vector.
Use diff to find the interdecade differences. Which decade had the greatest increase?
Explain why you could reasonably expect that the difference will always increase with each
decade. Is this the case with the data?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started