Question: R Exercises Sampling Letters The built - in vector letters contains the 2 6 lower - case letters of the alphabet. a . Using the
R Exercises
Sampling Letters
The builtin vector letters contains the lowercase letters of the alphabet.
a Using the sample function, take a sample of letters without replacement from letters
b Using the sample function, take a sample of letters with replacement from letters
Sampling Letters continued
a Write a function to take a sample of letters without replacement from letters
b Add a line in the function so that the function returns the number of vowels in the sample. If the sample is stored in
the vector then the line of code
sumy in caeiou
will count the number of vowels in the sample.c Using the function replicate take samples, storing the
number of vowels from the samples in the vector vowels d Approximate the probability that there are two vowels in
your sample.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
