Can I add something to this line to include mins and max as well?
My data consists of 4000 days of data and I would like a simple way of getting min, mean, and max for these days. Ideally in the same output
> head(dd)
Time RPH T Days
1 00:00:00 6.42 39.6 Day 1
2 00:15:00 6.46 39.7 Day 1
3 00:30:00 6.30 39.6 Day 1
4 00:45:00 6.26 39.4 Day 1
5 01:00:00 6.23 39.3 Day 1
6 01:15:00 6.23 38.5 Day 1
Each day consists of 96 observations. It is very similar format to the Iris data.frame. I have used this for my example.
iris
by(iris[,1:4],iris$Species,colMeans)
output:
>by(iris[,1:4],iris$Species,colMeans)
iris$Species: setosa
Sepal.Length Sepal.Width Petal.Length Petal.Width
5.006 3.428 1.462 0.246
------------------------------------------------------------
iris$Species: versicolor
Sepal.Length Sepal.Width Petal.Length Petal.Width
5.936 2.770 4.260 1.326
------------------------------------------------------------
iris$Species: virginica
Sepal.Length Sepal.Width Petal.Length Petal.Width
6.588 2.974 5.552 2.026
This is brilliant but considering the size of the data.frame I'm using:
- Is there a way I can include min and max to this?
- Or are there suggestions for something similar?
It would be great to have the values in a table for further manipulation.