How to write R codes? [🇷 for BE/BA]

posted by yjlee168 Homepage – Kaohsiung, Taiwan, 2015-09-04 09:55 (3578 d 02:52 ago) – Posting: # 15379
Views: 4,897

Dear BE-proff,

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

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,673 registered users;
95 visitors (0 registered, 95 guests [including 60 identified bots]).
Forum time: 12:47 CEST (Europe/Vienna)

Medical researches can be divided into two sorts:
those who think that meta is better and those
who believe that pooling is fooling.    Stephen Senn

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5