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.
In Rstudio: 1. Randomly sample 1000 species from the iris dataset 2. Convert the sample to...
I need assistance with coding, in RStudio 3.5.2 Consider the iris dataset. It has 150 rows and 5 columns and contains measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. head(iris, 3) ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3.0 1.4 0.2 setosa ## 3 4.7...
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 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 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 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 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 $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 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. 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.
The following sample dataset are exam scores from PSYC 295 classes from previous semesters: 60 55 71 58 44 68 88 61 78 79 83 47 54 64 46 71 34 54 80 45 64 94 62 39 50 1. Compute the mean, range, variance and standard deviation. 2. Calculate the values that would be assigned to the standard deviation lines. 3. Describe the trends that you see for the dataset.