Question

In Rstudio: 1. Randomly sample 1000 species from the iris dataset 2. Convert the sample to...

In Rstudio:

1. Randomly sample 1000 species from the iris dataset

2. Convert the sample to a standard vector

3. Also convert the vector to an ordered factor

4. What is the memory usage for the vector of strings (in bytes)?

Repeat 4 times.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

R code given below

Add a comment
Know the answer?
Add Answer to:
In Rstudio: 1. Randomly sample 1000 species from the iris dataset 2. Convert the sample to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 2 10 pts Take a look at the 'iris' dataset that comes with R. The...

    Question 2 10 pts Take a look at the 'iris' dataset that comes with R. The data can be loaded with the code: library(datasets) data(iris) A description of the dataset can be found by running ?iris What R code returns a vector of the means of the variables 'Sepal.Length, 'Sepal.Width, 'Petal.Length, and 'Petal.Width'? apply(iris, 2, mean) applyliris, 1:4], 2, mean) apply(iris[, 1:4], 1, mean) rowMeans(iris[, 1:4])

  • in R For the iris dataset, store the 50 sepal lengths for the 50 versicolor rises...

    in R For the iris dataset, store the 50 sepal lengths for the 50 versicolor rises in a vector x For the iris dataset, store the 50 sepal lengths for the 50 virginica irises in a vectory What are the means and the variances of x and y? The variances "seem" different. Perform Welch's t-test that is appropriate in such cases to check if the mean sepal lengths of Versicolor and Virginica irises are significantly different. What is the p-value...

  • What is the code and result in Rstudio or R 1. Suppose we have a random...

    What is the code and result in Rstudio or R 1. Suppose we have a random sample 1.12, 0.44, -1.49, 0.02, 0.81, -1.34,1.34, 0.51,-0.12, 0.97. (a). Use two methods to find the sample mean (b). Use two methods to find the sample variance. (c). Find the sample standard deviation. 2. We can use function rt(n 100, df 2) to generate a random sample from a t-distribution with two degrees of freedom. The sample size is n 100. (a). Generate a...

  • must be Rstudio code. can use other languages to do the problem but please convert to...

    must be Rstudio code. can use other languages to do the problem but please convert to R code The median is the middle of a dataset. For example, if your observations are c(1,2,3,8,10), the median is 3. Note ã = 1+2+3+8+10 4.8, so they're not necessarily equal. 5 The interquartile range is the difference between the 75% and 25% percentiles. The function IQR() in R can be used to compute it. Or, compute the 75% percentile with the function quantile(),...

  • [USING RSTUDIO] I am having trouble already in step 3 of number 1. Im not sure...

    [USING RSTUDIO] I am having trouble already in step 3 of number 1. Im not sure why what I typed isn't working. I appreciate anybody that can help me out. Thanks 1. Recall the `iris` data set from last week's exercise. The `iris` data set is already pre-loaded in R - look at the help file using `?iris` for more information on this data set.    i) Check the structure of the data using the function `str(iris)`.    ii) Find...

  • DO 2 AND 3. Question #1 Convert the following assembly program into machine code. LDAA WSA1 STAA $1000 INCA LDAB $10...

    DO 2 AND 3. Question #1 Convert the following assembly program into machine code. LDAA WSA1 STAA $1000 INCA LDAB $1000 DECB ABA Here: Bra Here Question # 2 (a) in Question # 1, determine the values of PC, A, B, N, Z, V, C after each instruction (b) Verify your answers by using CodeWarrior Question # 3 Assume that the program in Question 1 is saved in memory starting at location $COOA. Drawa memory diagram showing the contents (in...

  • The dataset consists of data collected from a random sample of 60 students from one instructor...

    The dataset consists of data collected from a random sample of 60 students from one instructor in Stat 30100. Thirty students were randomly chosen from the online class and 30 were chosen from the traditional face-to-face class. The variables recorded are the student's final grade percentage in the course, the amount of time they spent on their Study Plan, the number of Mastery Points they achievec at the end of the semester, and what type of class they are in...

  • a) Write a function 1) Take a simple random sample from a population of size n....

    a) Write a function 1) Take a simple random sample from a population of size n. 2) Compute the mean of sample, repeat it 10000 times and put them in a vector 3) Draw its histogram. 4) Use the function for treesSvolume and comment on that. Using the R-program to genrate the function. Data in R under name trees.

  • 1. Please use this dataset to answer the following questions: 4, 3, 6, 5, 3, 2,...

    1. Please use this dataset to answer the following questions: 4, 3, 6, 5, 3, 2, 4, 5, 7, 6, 3, 4, 6, 6, 1, 7, 8, 8, 23, 4, 0, 2, 6, 9, 6, 1, 5, 7, 4, 5 (1) Please calculate mean, median and mode. (2) Please calculate sample standard deviation. (3) According to your answer in part (2), please explain why sample standard deviation can never be negative. (4) Please calculate first quartile, second quartile, and third...

  • Graph Representation Worksheet 4 1. What are the storage requirements assuming an adjacency matrix is used....

    Graph Representation Worksheet 4 1. What are the storage requirements assuming an adjacency matrix is used. As- sume each element of the adjacency matrix requires four bytes 2. Repeat for an adjacency list representation. Assume that an int requires 4 bytes and that a pointer also requires 4 bytes 3. Now, consider an undirected graph with 100 vertices and 1000 edges. What are the storage requirements for the adjacent matrix and adjacency list data structures?

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT