Skip to content

Automatic routine - help

2 messages · BXC (Bendix Carstensen), Monica Palaseanu-Lovejoy

#
for (j in 1:n) df[,j] <- pmin( pmax( df[,j], 0 ), 1 )

should do the job.

Bendix Carstensen

----------------------
Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
mob: +45 30 75 87 38
fax: +45 44 43 07 06
bxc at steno.dk
www.biostat.ku.dk/~bxc
----------------------