• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home » Resolved: tidyr summarize and mutate by multiple groups – calculation

Resolved: tidyr summarize and mutate by multiple groups – calculation

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have some data, see subset below. For each Method I want to calculate the difference in the mean Cq between the 2uL and 4 uL and the 4 uL and the 8uL.
I have a function to calculate the mean for each Method, grouped by Volume. But I can’t figure out how to add another column with the difference. I think I might have to summarize the summ table, but I”m getting confused. Any help appreciated. Thanks
what I want but know if wrong:
current output:

Answer:

If the mean delta should be for each ‘Method’, then create the column first grouped by ‘Method’ (or if it is based across all the Method, then we do not need any grouping), get the mean difference of ‘Cq’ where ‘Volume is ‘2ul’ and ‘4ul’ respectively, use that in grouping for calculating the rest of the summarised columns
-output
Or it can be
-output

If you have better answer, please add a comment about this, thank you!

r tidyr
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: In a Pinescript v5 Strategy why is my bool not working?

02/04/2023

Resolved: net::ERR_HTTP2_PROTOCOL_ERROR by http get request angular 15.2

02/04/2023

Resolved: How do I stop the command from happening if the requirements for it to work aren’t sert Discord.js

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.