相关疑难解决方法(0)

计算多个数据帧的平均值

我想用R来绘制不同数据库系统的性能评估结果.对于每个系统,我加载了相同的数据,并在几次迭代中执行相同的查询.

单个系统的数据如下所示:

"iteration", "lines", "loadTime", "query1", "query2", "query3"
1, 100000, 120.4, 0.5, 6.4, 1.2
1, 100000, 110.1, 0.1, 5.2, 2.1
1, 50000, 130.3, 0.2, 4.3, 2.2

2, 100000, 120.4, 0.1, 2.4, 1.2
2, 100000, 300.2, 0.2, 4.5, 1.4
2, 50000, 235.3, 0.4, 4.2, 0.5

3, 100000, 233.5, 0.7, 8.3, 6.7
3, 100000, 300.1, 0.9, 0.5, 4.4
3, 50000, 100.2, 0.4, 9.2, 1.2
Run Code Online (Sandbox Code Playgroud)

我现在需要的(用于绘图)是包含这些测量的平均值的矩阵或数据帧.

目前我这样做:

# read the file
all_results <- read.csv(file="file.csv", head=TRUE, sep=",")

# split the results by iteration
results …
Run Code Online (Sandbox Code Playgroud)

r

6
推荐指数
1
解决办法
9003
查看次数

标签 统计

r ×1