> depr _ read.table("depression.dat",header=T) > names(depr) [1] "Hospt" "Treat" "Outcome" "Time" "AcuteT" "Age" "Gender" > dim(depr) [1] 109 7 > > for (i in names(depr)) { + print(summary(depr[,i])) + } Min. 1st Qu. Median Mean 3rd Qu. Max. 1.000 2.000 5.000 3.927 5.000 6.000 Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0000 0.0000 1.0000 0.9725 2.0000 2.0000 Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0000 0.0000 1.0000 0.5229 1.0000 1.0000 Min. 1st Qu. Median Mean 3rd Qu. Max. 0.000 6.286 31.860 46.520 78.430 206.000 Min. 1st Qu. Median Mean 3rd Qu. Max. 47.0 133.0 165.0 185.7 214.0 512.0 Min. 1st Qu. Median Mean 3rd Qu. Max. 20.00 29.00 39.00 40.26 51.00 65.00 Min. 1st Qu. Median Mean 3rd Qu. Max. 1.000 1.000 1.000 1.349 2.000 2.000 > > for (i in names(depr)) { + print(sd(depr[,i]))> names(depr) [1] "Hospt" "Treat" "Outcome" "Time" "AcuteT" "Ag > table(depr$Hospt) 1 2 3 5 6 18 17 10 38 26 > table(depr$Treat) 0 1 2 37 38 34 > table(depr$Outcome) 0 1 52 57 > table(depr$Gender) 1 2 71 38 + } [1] 1.879255 [1] 0.810335 [1] 0.5017807 [1] 45.14164 [1] 88.61862 [1] 12.86209 [1] 0.4787357 > > search() [1] ".GlobalEnv" "package:ctest" "Autoloads" "package:base" > attach(depr) > search() [1] ".GlobalEnv" "depr" "package:ctest" "Autoloads" [5] "package:base" > stem(Time) The decimal point is 1 digit(s) to the right of the | 0 | 00001111111222333333455555666778899 1 | 124666778 2 | 01226778 3 | 01236688 4 | 0024566 5 | 016 6 | 4778 7 | 2455888889 8 | 36 9 | 368 10 | 02235555667 11 | 025 12 | 57 13 | 1 14 | 15 | 5 16 | 5 17 | 18 | 19 | 20 | 6 > stem(AcuteT) The decimal point is 1 digit(s) to the right of the | 4 | 785 6 | 3027 8 | 660058 10 | 255045 12 | 2789900136899 14 | 0000116667778849 16 | 002225578835667 18 | 1222714567 20 | 1346791244 22 | 474789 24 | 696 26 | 14 28 | 0594 30 | 56 32 | 2 34 | 38 36 | 2 38 | 9 40 | 42 | 8 44 | 1 46 | 6 48 | 50 | 2 > stem(Age) The decimal point is at the | 20 | 0 22 | 0000000000000 24 | 00 26 | 00000 28 | 00000000 30 | 00000000 32 | 0000000 34 | 0000 36 | 000 38 | 0000 40 | 00000 42 | 00 44 | 000 46 | 000000 48 | 000000 50 | 0000000 52 | 0000 54 | 0000 56 | 00000 58 | 00 60 | 000000 62 | 00 64 | 00 > par(mfrow=c(2,2)) > hist(Age) > hist(AcuteT) > hist(Time) > dev.print(command="cat > mypicture.ps") X11 2 > system("ls -al my*") -rw-r--r-- 1 brian users 7411 Aug 30 16:05 mypicture.ps