Emily M.

asked • 04/01/22

What are the mistakes in this code, using R studio?

 the statistician decides to use the processed dataset to calculate the mean DNA damage for each combination of conditions defined by cancer cell line, anti-cancer agent and concentration. There are ten replicate cases for each unique experimental condition. They try to use the following dplyr code to do this:

Summarised_Data <-
#// line 1
Results_Data %>%
#// line 2
group_by(Cell_Line, Agent) %>%
#// line 3
summarise(Mean_Damage = calculate_mean(DNA_Damage, na.rm = TRUE)

I have identified 3:

I think there is one error in line 1 as the wrong data frame is used


no errors in line 2 


2 errors in line 3 as there is a missing bracket and the function 'calculate_mean" doesnt exist 


please could someone advise if they agree or not


thanks 



1 Expert Answer

By:

David B. answered • 04/11/22

Tutor
5.0 (257)

Math and Statistics need not be scary

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.