Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (30pts) The following code was used to perform the permutation test for Chargaff's table. To run the code, you need to put the file

image text in transcribed
2. (30pts) The following code was used to perform the permutation test for Chargaff's table. To run the code, you need to put the file ChargaffTable RData in the same folder as your R script file. If you still get an error message "No such file or directory" when you load ChargaffTable.RData, then in the RStudio menu bar click Session -> Set Working Directory -> To Source File Location. load("ChargaffTable.RData") statChf = function(x){ sum((x[, 1] - x[. 2])^2 + (x[. 3] - x[. 4])^2) } chistat = statChf(ChargaffTable) n.rep = 10000 permstat = numeric(n.rep) for (i in 1:n.rep)( permuted = tapply(ChargaffTable, 1, sample)) permstat[i] = statChf(permuted) pChf = sum(permstat

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting

Authors: Ray Garrison, Eric Noreen and Peter Brewer

14th edition

978-007811100, 78111005, 978-0078111006

Students also viewed these Mathematics questions

Question

What is the relationship between learning and cognition?

Answered: 1 week ago

Question

36. Let p0 = P{X = 0} and suppose that 0 Answered: 1 week ago

Answered: 1 week ago