How to write R codes? [🇷 for BE/BA]
Dear BE-proff,
I am not sure if this is what you want (a function)?
or you can write the script this way:
I am not sure if this is what you want (a function)?
BE.proff.mean<-function(){
xx<-c(1,2,3,4,5,6,7,8,9,10,11)
yy<-c(11,12,13,14,15,16,17,18)
cat("mean1:",mean(xx),"\n")
cat("mean2:",mean(yy),"\n")}
BE.proff.mean()
or you can write the script this way:
BE.proff.mean<-function(xx,yy){
cat("mean1:",mean(xx),"\n")
cat("mean2:",mean(yy),"\n")}
aa<-c(1,2,3,4,5,6,7,8,9,10,11)
bb<-c(11,12,13,14,15,16,17,18)
BE.proff.mean(aa,bb)
—
All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
All the best,
-- Yung-jin Lee
bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Complete thread:
- How to write R codes? BE-proff 2015-09-03 23:03 [🇷 for BE/BA]
- How to write R codes?yjlee168 2015-09-04 07:55
- How to write R codes? BE-proff 2015-09-04 10:28
- How to write R codes?yjlee168 2015-09-04 07:55