Popular in Course
Popular in Statistics
This 0 page Class Notes was uploaded by Orpha Swift on Sunday November 1, 2015. The Class Notes belongs to STA402 at Miami University taught by A.Bailer in Fall. Since its upload, it has received 22 views. For similar materials see /class/233365/sta402-miami-university in Statistics at Miami University.
Reviews for StatisticalProgramming
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 11/01/15
Day 4 03 Sept 03 Class Activities CDocumehts and SettingsJohh BailerMy DocumentsbailerajClassesFall 2003hahdoutsday4 03sep03doc title revisited jittering you can have more than one title in a program proc format value totfmt 0 39none39 1 HIGH39some39 data d1 title Reproductive Toxicity Study of Nitrofen in C dubia footnote Data previously analyzed by Bailer and Oris l993 infile 39Mpublicwwwclassessta402SAS programsch2 dattxt39 firstobs16 expandtabs missover pad input 9 animal 2 17 conc 3 25 broodl 33 brood2 41 brood3 49 total 2 NNN cbrood3 brood3 format cbrood3 totfmt label animal animal ID number label conc Nitrofen concentration label broodl number of young in first brood label brood2 number of young in 2nd brood label brood3 number of young in 3rd brood label total total young produced in three broods options pagenc1 nodate Data d3 set d1 jconc conc 20ranuni0 10 jbroodl broodl 2ranuni0 l jbrood2 brood2 2ranuni0 l jbrood3 brood3 2ranuni0 l add jitter to the concentration for plotting add jitter to the counts as well proc plot title2 Plot of Brood counts vs Nitrofen concentration title3 points jittered in both x and y directions plot jbroodljconcquotlquot jbrood2jconcquot2quot jbrood3jconcquot3quot overlay vaxis0 to 20 by 2 run proc plot title2 Plot of Brood 1 young produced vs concentration plot jbroodljconcquotlquot vaxis0 to 20 by 2 run proc plot title2 Plot of Brood 2 young produced vs concentration plot jbrood2jconcquot2quot vaxis0 to 20 by 2 run proc plot title2 Plot of Brood 3 young produced vs concentration plot jbrood3jconcquot3quot vaxis0 to 20 by 2 run output follows jbroodl NOTE 20 31 Reproductive Toxicity Study of Nitrofen in C dubia 1 Plot of Brood counts vs Nitrofen concentration points jittered in both x and y directions Plot of jbrood1jconc Plot of jbrood2jconc Plot of jbrood3jconc Symbol used is 39139 Symbol used is 39239 Symbol used is 39339 3 3 3 3 3 33 3 3 23 233 3 2 2 2 3 3 3 2 2 2 2 2 23 2 2 22 222 2 32 23 32 2 3 3 2 2 33 3 2 22 2 2 3 1 2 1 1 2 3 1 1 1 1 1 1 1 1 11 1 3 1111 111 11 11 11 1 1 1 1 1 1 2 11 1 1 1 1 1 21 2 1232 22 23 23 2 222 ff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotff 56 6 56 166 156 266 256 366 356 obs hidden jconc Data previously analyzed by Bailer and Oris 1993 Reproductive Toxicity Study of Nitrofen in C dubia Plot of Brood 1 young produced vs concentration Plot of jbrood1jconc Symbol used is 39139 20 1 1 1 18 n 1 1 1 16 n 1 1 1 14 n 1 jbroodl 1 12 n 1 1 1 10 n 1 1 1 8 n 1 1 1 1 1 1 1 1 1 6 n 1 1 1 1 11 1 1 11 11 11 1 11 1 11 1 11 1 4 n 1 1 11 11 1 1 1 1 2 n 1 1 1 1 i 0 ffquotfffffffffquotfffffffffquotfffffffffquotfffffffffquotfffffffffquotfffffffffquotfffffffffquotfffffffffquotff 50 0 50 100 150 200 250 300 350 jconc NOTE 5 obs hidden Data previously analyzed by Bailer and Oris 1993 Reproductive Toxicity Study of Nitrofen in C dubia Plot of Brood 2 young produced vs concentration Plot of jbrood2jconc Symbol used is 39239 14 2 2 jbrood2 N 12 2 2 22 2 2 22 2 0 2 ff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotff 50 0 50 100 150 200 250 300 350 jconc NOTE 4 obs hidden 6 obs out of range Data previously analyzed by Bailer and Oris 1993 Reproductive Toxicity Study of Nitrofen in C dubia Plot of Brood 3 young produced vs concentration Plot of jbrood3jconc Symbol used is 39339 w w 14 33 3 jbrood3 12 w w w w w w w 33 0 33 3 ff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotfffffffff quotff 50 0 50 100 150 200 250 300 350 jconc NOTE 4 obs hidden 6 obs out of range Data previously analyzed by Bailer and Oris 1993 How about multiple plots per page proc plot hpercent50 vpercent50 plot jbrood1jconcquot1quot jbrood2jconcquot2quot jbrood3jconcquot3quot totaljconc haxis 0 to 400 by 100 run Reproductive Toxicity Study of Nitrofen in C dubia 9 Plot of Brood 3 young produce vs concentration notice that TITLE and TITLE2 carried over from previous declaration Plot of jbrood1jconc Symbol used is 39139 Plot of jbrood2jconc Symbol used is 39239 10 quot jbrood2 20 n 1 1 jbrood1 1 1 22 2 1 1 1 22 22 2 2 11 1 1 1 1 1 10 quot2 22 2 2 2 1 11 1 1 11 2 2 5 quot11 1 1 11 2 1 1 1 2 1 1 1 0 n 22 222 1 1 1 1 1 1 1 1 1 10 n 0 A 1 quotffffffffnffffffffquotffffffffnffffffffA quotffffffffnffffffffquotffffffffnffffffffquot 0 100 200 300 400 0 100 200 300 400 jconc jconc NOTE 11 obs hidden 3 obs out of range TE 23 obs hidden 3 obs out of range notice that the jittering produced points out of range with haxis starting at Zero Plot of jbrood3jconc Symbol used is 39339 Plot of totaljconc A1 B2 etc jbrood3 40 quot 20 A A 3 3 CA CA 33 333 total BA B c 33 33 A D 10 quot3 3 3 33 A AA B A 3 A A A 33 20 AA 1 1 B 0 n 3 333 B A 1 1 A A C33 16 A a A quotffffffffnffffffffquotffffffffquotffffffffquot fquotffffffffquotffffffffnffffffffquotffffffffquotf 0 100 200 300 400 0 100 200 300 400 Jconc jconc NOTE 24 obs hidden 3 obs out of range Data previously analyzed by Bailer and Oris 1993 Miami University RedHawk Cluster Working on the Cluster The RedHawk cluster is a general purpose research computing resource available to support the research community at Miami University This document provides a general introduction to working on the cluster Conventions used in this J Initial Login C quot to the 39 quot Node Working with l i mIY Listing les Directories in l inux Copying and moving files Deleting files Viewing and Editing Files Online Help Logging out INONCNUIUIUJUJNNH For information on connecting to the cluster see the separate Connecting to the RedHawk Cluster with specific versions for Windows Mac and Linux document available in the Miami University Knowledge Base httpkbmuohioedu or the Miami University Research Computing Group web site httpwww mlmhio rlu 39 quot Conventions used in this document In this document commands that are to be typed in Linux will be shown enclosed in quotes in an alternate font and should be entered as shown but without the quotation marks For reference in the alternate font the letter I lower case L is distinct from the number 1 to avoid confusion Last updated January 7 2008 Page 1 Miami University RedHawk Cluster Working on the Cluster Initial Login When you initially login to the cluster you are logged into the head node of the cluster From here you can submit batch jobs work interactively or connect to the cluster s interactive node Interactive work can be done on the head node but there is a 2 hour limit for CPU usage so more intensive interactive work should be done on the interactive node When you first login you will see a screen similar to the following i v39uvdc luggrruulmz 39 7 i nf gt The nal line is the default prom t on the cluster Above this is a list of current hot tips which are announcements about changes 0 the cluster newly installed software etc To display one of the hot tips type hottip followed y the exact name of the tip and press retum enter For example to view the available tip on Matlab you would type hottip MATLAB and press enter To see a list of all available tips type hottip and press enterretum When a hot tip is displayed it will be displayed one screen at a time Press the space bar to advance one screen The b key will go back one screen and the q key can be used to end the display ofthe hot tip Connecting to the Interactive Node To connect to the 8CPU node designed for interactive use issue the command ssh 000 and press enterretum after logging into the cluster Your prompt will change to show that you are Last updated January 7 2008 Page 2 Miami University RedHawk Cluster Working on the Cluster working on the computeOO node When you have nished working on the interactive node issue the command exit to return to the head node of the cluster Working with Linux The RedHawk cluster runs the Linux operating system The goal of this section is to provide a brief introduction to working with Linux on the RedHawk cluster Please email the Research Computing Support RCS Group at rescompmuohioedu with any questions about working with Linux that are not covered in this document The RCS Group can provide individual support to users as needed One of the main things to know when working with Linux is that it is casesensitive If you receive a command not found message the rst thing to check is the capitalization used in the command Linux supports le names with up to 256 characters which can include uppercase and lowercase letters numbers dashes periods and underscore characters Linux le names can contain spaces and other special characters but these should be avoided since working with le names that contain spaces or other special characters require special handling Listing les The Linux Is for listing command will list all les in the current directory except hidden les Hidden les have names that start with a and can be included in the le list by executing Is a To see additional information about les use the command Is a This will produce output similar to this Last updated January 7 2008 Page 3 Miami University RedHawk Cluster Working on the Cluster The columns in the output from the Is a I command contain the following data Column 1 contains the le permissions The rst character is normally a A d in the rst column indicates that the le is a directory and an 1 indicates that the le is a link to another le see the last le listed 7 testlink The remaining nine characters in the rst column can be broken into three groups of three which are the le permissions for the le owner the group owner and all other users The letters r w and x indicate read write and execute permissions For a directory x is the priVilege to list the contents of the directory For le shiftprot in the example the owner can read and write to the le members of the group owning the le have read permission and all other users have no priVileges Column 2 lists the number of links to a le Column 3 lists the le owner Column 4 lists the group associated with the le Column 5 lists the le size in bytes Column 6 lists the date and time the le was modi ed If the last modi cation time is more than a year ago the time portion of the output is replaced with the year Column 7 lists the le name If the le is a link the name of the linked le is also indicated To restrict the number of les displayed by the Is command wildcards can be used The character is used to match a single character For example the command Is at would display Last updated January 7 2008 Page 4 Miami University RedHawk Cluster Working on the Cluster les or directories named cat and hat but not a le named chat The character will match any number of character For example the command Is 0 will list all les and directories starting with the letter c Directories in Linux Directories and subdirectories in Linux are similar to folders and subfolders on Windows PCs and Macs The character is used to separate elements of the directory tree For example on the cluster the directory you are in when you initially login is homeuniqueID 7 for example homewoodsdm2 This is referred to as your home directory The m kdir command is used to create make ectories For example to create a sub directory of the current directory called dir2 you would use the command mkdir dir2 Directories can be removed using the rmdir remove ectory command for example rmdir dir2 Note that directories cannot be removed if they contain any les To see the directory you are currently working in use the pwd print working directory command To change into a different directory use the Cd change directory command For example to change into a directory called dir2 that is a subdirectory of your current working directory you would use the command Cd dir2 You can also specify the target directory using the full path 7 to change to a subdirectory called dir3 that is a subdirectory of your home directory you would use the command Cd homeuniqueDdir3 Every Linux directory contains two special directories named and The directory is a shortcut to the current directory and can be useful when moving or copying les The directory is a shortcut to the parent directory of the current directory For example if you are in the directory homeuniqueIDdir3 and want to move to homeuniqueIDdir4 you can use the command Cd dir4 Copying and moving les In Linux the op copy command is used to copy les and the mv move command is used to rename les By default no warning is given if les are going to be overwritten but with both commands a i option op i and mv i will warn before overwriting a le The syntax for both the op and mv commands is the same 7 command sourcefile ta rgetfile For example the command op filel file2 will make a new le named le2 that is identical to lel The command mv filel file2 will rename lel to le2 The source le and target le names can also include directory information 7 op tmpfiel will copy a le named lel from the tmp directory to the current directory the nal uses the shortcut to the current directory The command mv dirlfilel dir2file2 moves a le named filel from the dirl sub directory of the current directory to the dir2 subdirectory of the current directory and renames it to le2 Last updated January 7 2008 Page 5 Miami University RedHawk Cluster Working on the Cluster The op and mv commands can also be used when working with directories To rename a directory use the mv command with the same syntax as that used when renaming les When copying les you will want to use the r option which will recursively copy any les and sub directories For example to copy the directory dirl and its contents from tmp to the current working directory you would use the command op r tm pdirl Deleting les In Linux les are deleted using the rm remove command 7 rm filel will remove a le named lel If lel is actually a directory the command will fail 7 use the rmdir command instead The standard wildcards can be used with the rm command 7 rm 0 would remove all les starting with the letter c from the current directory If the directory contained a sub directory starting with a c a warning message would state that it could not be removed but all les starting with a c would be removed Using wildcards with the rm command can be dangerous so a suggestion is to use the Is command with the same wildcard rst to see what les would be removed The rm command has an optional i option that will require you to type y to con rm every le deletion This can be useful for example if you have a number of les starting with the letter c and want to delete some but not all of them The command rm i 0 would attempt to delete all les starting with the letter c but would require you to type y to con rm each deletion Ifyou answer the le deletion prompt with any other character the le will not be deleted Note that Linix does not have a feature like the Windows Recycle Bin 7 once a le is deleted in Linux it is removed from the system and the only option to recover it is to see if it is available on a backup tape Viewing and Editing Files The Linux less command can be used to view les The command less filel will display the contents of lel to the screen one screen at a time The space bar will move forward one screen the b key will move back one screen and pressing q will end the display You can also search for strings in a le while you are viewing it using less Typing string and pressing the return key will search for the next occurrence of string You can then press the n key to see the next occurrence ofthe string To nish searching press the q key Typing a number followed by the g key will go to the speci ed line number in the le In addition to viewing the contents of les the less command can also be used to view lengthy output from other commands This is done by piping the output of the command to the less command For example to use less to view the output of the le listing command you can use the command ls l less 7the l key is known as a pipe symbol in Linux Last updated January 7 2008 Page 6 Miami University RedHawk Cluster Working on the Cluster Several text editors are available on the cluster and one of the easiest to use is nano Entering the command na no filel will open a le for editing and ifthe le does not exist it will be created The main nano window is shown below g M GNU nano 124 File filel Modified J 33 quotJ39 l iJru QwumjJ vunple of Edle 111 a file 1311 nano A The main commands are shown at the bottom of the window The symbol indicates to press the control key as part of the command For example to save write out the le you would press the control key and the 0 key at the same time Information about all nano commands can be found in the help which can be accessed by typing controlg In the help commands listed with a M key combination such as MG to go to a speci c line number are executed by using the Alt key 7 MG can be executed by pressing the Alt key and the g key at the same time Online Help Online help for most Linux commands can be viewed using the man command For example the command man rmdi r will display information about the command using to remove directories Logging out To end your session on the RedHawk cluster type exit and press the retumenter key Last updated January 7 2008 Page 7
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'