获得平均值? [英] Get the average value ?

查看:105
本文介绍了获得平均值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我需要编写一个函数来计算来自数据库的coupe

参数的平均值。


问题1


(价值)(回答具体价值的人)

[1] 5

[2] 21

[3] 67

[4] 233

[5] 348


任何想法都会非常受欢迎。


谢谢

Jess

Hello,

I need to write a function to calculate the average value from a coupe
of parameters from database.

Question 1

(value) (people that answer the specific value)
[1] 5
[2] 21
[3] 67
[4] 233
[5] 348

Any ideas would be very welcome.

Thanks
Jess

推荐答案

如果你想给老师留下深刻印象,你应该使用递归的

函数。好吧,只需使用for(每个)功能。


祝你好运。


Jeroen
je ************ @ yahoo.se schreef:
If you want to impress your teacher, you should use a recursive
function. Else just use a for(each) function.

Good luck.

Jeroen
je************@yahoo.se schreef:

你好,


我需要编写一个函数来计算来自数据库的coupe

参数的平均值。 />

问题1


(价值)(回答具体价值的人)

[1] 5
[2] 21

[3] 67

[4] 233

[5] 348


任何想法都会非常受欢迎。


谢谢

Jess
Hello,

I need to write a function to calculate the average value from a coupe
of parameters from database.

Question 1

(value) (people that answer the specific value)
[1] 5
[2] 21
[3] 67
[4] 233
[5] 348

Any ideas would be very welcome.

Thanks
Jess


好吧,如果数据在数据库中,那么最好的选择是在* * / $
数据库中执行此操作,使用带有GROUP BY和AVG()的SQL;然而,这就变成了错误的小组; -p


Marc
Well, if the data is in a database, then the best option is to do this *at*
the database, using SQL with GROUP BY and AVG(); however, this then becomes
the wrong group ;-p

Marc


查找SQL命令AVG
http://www.w3schools.com/sql /func_avg.asp

-

问候


John Timney(MVP)

访问我的网站:
http://www.johntimney.com
http://www.johntimney.com/blog

< je ************ @ yahoo.sewrote in message

news:11 ************** ********@i42g2000cwa.googlegr oups.com ...
look up the SQL command AVG
http://www.w3schools.com/sql/func_avg.asp
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
<je************@yahoo.sewrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...

您好,


我需要写一个函数来计算一个coupe的平均值

来自数据库的参数。


问题1


(值)(回答特定val的人ue)

[1] 5

[2] 21

[3] 67

[4] 233

[5] 348


任何想法都会非常受欢迎。


谢谢

Jess
Hello,

I need to write a function to calculate the average value from a coupe
of parameters from database.

Question 1

(value) (people that answer the specific value)
[1] 5
[2] 21
[3] 67
[4] 233
[5] 348

Any ideas would be very welcome.

Thanks
Jess



这篇关于获得平均值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆