-1

I'm quite new to using R so please bear with me.

I'm using the Theoph dataset and need to find the min, median, max concentration for each subject. Both are listed as variables in the dataset.

The subjects are listed like 1,1,1,1,1,2,2,2,2,2,3,3...etc. each with a corresponding concentration value.

How would I approach this and preferably using the tidyverse package (although can use another if it works) if I wanted to present the end result in a table (a data frame)

bird
  • 2,938
  • 1
  • 6
  • 27

1 Answers1

0

Here a solution in base R:

aggregate(Theoph$conc, list(Theoph$Subject), summary)
OliverHennhoefer
  • 677
  • 2
  • 8
  • 21