This is bash profile. bash-4.2$ emacs . Display localhost:0 unavailable, simulating -nw emacs: Terminal type "dumb" is not powerful enough to run Emacs. It lacks the ability to position the cursor. If that is not the actual type of terminal you have, use the Bourne shell command `TERM=... export TERM' (C-shell: `setenv TERM ...') to specify the correct type. It may be necessary to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well. bash-4.2$ which r which: no r in (/usr/lib64/qt-3.3/bin:/home/accts/sbs5/perl5/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin) bash-4.2$ which R /usr/bin/R bash-4.2$ R R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > getwd() [1] "/home/httpd/html/zoo/classes/cs458/lectures" > list.files() [1] "0904.html" "0904.html~" "Day1.html" "Day1.html~" [5] "Rplots.pdf" "students.csv" "students.csv~" "Week1.html" [9] "Week1.html~" > setwd("..") > getwd() [1] "/home/httpd/html/zoo/classes/cs458" > setwd("lectures") > getwd() [1] "/home/httpd/html/zoo/classes/cs458/lectures" > list.files() [1] "0904.html" "0904.html~" "Day1.html" "Day1.html~" [5] "Rplots.pdf" "students.csv" "students.csv~" "Week1.html" [9] "Week1.html~" > s <- read.csv("students.csv") > s Status R Python 1 junior 1 8 2 senior 1 4 3 senior 1 5 4 senior 0 0 5 senior 8 6 6 junior 2 6 7 senior 1 8 8 senior 4 4 9 junior 2 7 10 junior 1 5 11 senior 6 8 12 senior 0 8 13 senior 1 7 14 sophomore 1 9 15 senior 1 10 16 senior 5 9 17 senior 0 5 18 junior 5 10 19 junior 3 8 20 senior 7 9 21 senior 9 2 22 senior 1 8 23 junior 2 8 24 grad 1 5 25 senior 2 3 26 grad 1 7 27 senior 8 4 28 senior 1 7 29 senior 1 3 30 junior 1 8 31 senior 1 6 32 sophomore 1 4 33 senior 3 8 34 grad 5 8 35 senior 7 1 36 senior 5 8 37 junior 3 4 38 junior 1 6 39 junior 1 3 40 senior 1 1 41 sophomore 1 10 42 senior 8 5 43 junior 1 9 44 junior 1 4 45 junior 1 2 46 junior 4 0 47 senior 1 5 48 senior 0 5 49 junior 2 2 50 senior 1 3 51 senior 1 8 52 senior 1 7 53 junior 1 3 54 junior 6 8 55 senior 1 5 56 ugrad 2 10 57 senior 1 7 58 sophomore 1 7 59 senior 3 7 60 junior 5 2 61 junior 1 7 62 senior 0 7 63 junior 7 9 64 junior 1 1 65 senior 1 7 66 junior 1 3 67 junior 3 3 68 senior 1 1 69 senior 1 3 70 junior 2 7 71 junior 1 6 72 junior 1 1 73 grad 1 1 74 junior 2 3 75 sophomore 6 6 76 senior 2 8 77 senior 8 8 78 junior 1 2 79 junior 1 5 80 junior 2 1 81 grad 2 8 82 junior 1 10 83 junior 6 1 84 sophomore 1 5 85 senior 1 6 86 senior 1 5 87 junior 2 8 88 junior 1 10 89 junior 7 10 90 grad 8 1 91 junior 1 1 92 grad 1 4 93 junior 3 7 94 junior 2 5 95 senior 1 6 96 grad 1 6 97 junior 1 5 98 senior 4 2 99 grad 1 2 100 grad 1 5 101 ugrad 1 4 102 senior 7 2 103 senior 8 1 104 senior 5 7 105 senior 1 7 106 grad 1 5 107 grad 1 3 108 senior 6 8 109 junior 1 8 110 grad 1 3 111 grad 0 3 112 grad 8 4 113 junior 0 6 114 senior 8 8 115 sophomore 3 3 116 grad 0 6 117 junior 1 1 118 grad 1 5 119 junior 1 6 120 junior 2 1 121 senior 1 5 122 senior 5 5 123 grad 7 5 124 grad 1 7 125 senior 2 8 126 junior 0 0 127 sophomore 2 8 128 sophomore 2 8 129 senior 3 8 130 senior 5 8 131 junior 7 4 132 senior 1 7 133 junior 1 4 134 junior 5 6 135 grad 1 5 136 senior 1 1 137 grad 1 1 138 senior 5 7 139 senior 1 2 140 junior 1 1 > head(s) Status R Python 1 junior 1 8 2 senior 1 4 3 senior 1 5 4 senior 0 0 5 senior 8 6 6 junior 2 6 > tail(s) Status R Python 135 grad 1 5 136 senior 1 1 137 grad 1 1 138 senior 5 7 139 senior 1 2 140 junior 1 1 > summary(s) Status R Python grad :20 Min. :0.000 Min. : 0.000 grad : 1 1st Qu.:1.000 1st Qu.: 3.000 junior :50 Median :1.000 Median : 5.000 senior :58 Mean :2.457 Mean : 5.257 sophomore: 9 3rd Qu.:3.000 3rd Qu.: 8.000 ugrad : 2 Max. :9.000 Max. :10.000 > str(s) 'data.frame': 140 obs. of 3 variables: $ Status: Factor w/ 6 levels "grad","grad ",..: 3 4 4 4 4 3 4 4 3 3 ... $ R : int 1 1 1 0 8 2 1 4 2 1 ... $ Python: int 8 4 5 0 6 6 8 4 7 5 ... > ls() [1] "s" > ss <- read.csv("students.csv") > str(ss) 'data.frame': 140 obs. of 3 variables: $ Status: Factor w/ 5 levels "grad","junior",..: 2 3 3 3 3 2 3 3 2 2 ... $ R : int 1 1 1 0 8 2 1 4 2 1 ... $ Python: int 8 4 5 0 6 6 8 4 7 5 ... > summary(ss) Status R Python grad :21 Min. :0.000 Min. : 0.000 junior :50 1st Qu.:1.000 1st Qu.: 3.000 senior :58 Median :1.000 Median : 5.000 sophomore: 9 Mean :2.457 Mean : 5.257 ugrad : 2 3rd Qu.:3.000 3rd Qu.: 8.000 Max. :9.000 Max. :10.000 > names(ss) [1] "Status" "R" "Python" > table(ss) , , Python = 0 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 0 0 0 0 0 0 0 0 0 junior 1 0 0 0 1 0 0 0 0 0 senior 1 0 0 0 0 0 0 0 0 0 sophomore 0 0 0 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 1 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 2 0 0 0 0 0 0 1 0 junior 0 5 2 0 0 0 1 0 0 0 senior 0 3 0 0 0 0 0 1 1 0 sophomore 0 0 0 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 2 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 1 0 0 0 0 0 0 0 0 junior 0 2 1 0 0 1 0 0 0 0 senior 0 1 0 0 1 0 0 1 0 1 sophomore 0 0 0 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 3 R Status 0 1 2 3 4 5 6 7 8 9 grad 1 2 0 0 0 0 0 0 0 0 junior 0 3 1 1 0 0 0 0 0 0 senior 0 3 1 0 0 0 0 0 0 0 sophomore 0 0 0 1 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 4 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 1 0 0 0 0 0 0 1 0 junior 0 2 0 1 0 0 0 1 0 0 senior 0 1 0 0 1 0 0 0 1 0 sophomore 0 1 0 0 0 0 0 0 0 0 ugrad 0 1 0 0 0 0 0 0 0 0 , , Python = 5 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 5 0 0 0 0 0 1 0 0 junior 0 3 1 0 0 0 0 0 0 0 senior 2 5 0 0 0 1 0 0 1 0 sophomore 0 1 0 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 6 R Status 0 1 2 3 4 5 6 7 8 9 grad 1 1 0 0 0 0 0 0 0 0 junior 1 3 1 0 0 1 0 0 0 0 senior 0 3 0 0 0 0 0 0 1 0 sophomore 0 0 0 0 0 0 1 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 7 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 2 0 0 0 0 0 0 0 0 junior 0 1 2 1 0 0 0 0 0 0 senior 1 7 0 1 0 2 0 0 0 0 sophomore 0 1 0 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 8 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 0 1 0 0 1 0 0 0 0 junior 0 3 2 1 0 0 1 0 0 0 senior 1 3 2 2 0 2 2 0 2 0 sophomore 0 0 2 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 9 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 0 0 0 0 0 0 0 0 0 junior 0 1 0 0 0 0 0 1 0 0 senior 0 0 0 0 0 1 0 1 0 0 sophomore 0 1 0 0 0 0 0 0 0 0 ugrad 0 0 0 0 0 0 0 0 0 0 , , Python = 10 R Status 0 1 2 3 4 5 6 7 8 9 grad 0 0 0 0 0 0 0 0 0 0 junior 0 2 0 0 0 1 0 1 0 0 senior 0 1 0 0 0 0 0 0 0 0 sophomore 0 1 0 0 0 0 0 0 0 0 ugrad 0 0 1 0 0 0 0 0 0 0 > class(ss) [1] "data.frame" > library(swirl) | Hi! I see that you have some variables saved in your workspace. To keep | things running smoothly, I recommend you clean up before starting swirl. | Type ls() to see a list of the variables in your workspace. Then, type | rm(list=ls()) to clear your workspace. | Type swirl() when you are ready to begin. > ls() [1] "s" "ss" > rm (list=ls()) > ls() character(0) > swirl() | Welcome to swirl! | Please sign in. If you've been here before, use the same name as you did | then. If you are new, call yourself something unique. What shall I call you? SS | Thanks, SS. Let's cover a few quick housekeeping items before we begin our | first lesson. First of all, you should know that when you see '...', that | means you should press Enter when you are done reading and ready to continue. ... <-- That's your cue to press Enter to continue | Also, when you see 'ANSWER:', the R prompt (>), or when you are asked to | select from a list, that means it's your turn to enter a response, then press | Enter to continue. Select 1, 2, or 3 and press Enter 1: Continue. 2: Proceed. 3: Let's get going! Selection: 1 | You can exit swirl and return to the R prompt (>) at any time by pressing the | Esc key. If you are already at the prompt, type bye() to exit and save your | progress. When you exit properly, you'll see a short message letting you know | you've done so. | When you are at the R prompt (>): | -- Typing skip() allows you to skip the current question. | -- Typing play() lets you experiment with R on your own; swirl will ignore | what you do... | -- UNTIL you type nxt() which will regain swirl's attention. | -- Typing bye() causes swirl to exit. Your progress will be saved. | -- Typing main() returns you to swirl's main menu. | -- Typing info() displays these options again. | Let's get started! ... | To begin, you must install a course. I can install a course for you from the | internet, or I can send you to a web page | (https://github.com/swirldev/swirl_courses) which will provide course options | and directions for installing courses yourself. (If you are not connected to | the internet, type 0 to exit.) 1: R Programming: The basics of programming in R 2: Regression Models: The basics of regression modeling in R 3: Don't install anything for me. I'll do it myself. Selection: 1 | Sorry, but I'm unable to fetch ‘R Programming: The basics of programming in | R’ right now. Are you sure you have an internet connection? If so, would you | like to try again or visit the course repository for instructions on how to | install a course manually? Type 0 to exit. 1: Try again! 2: Send me to the course repository for manual installation. Selection: 1 | Sorry, but I'm unable to fetch ‘R Programming: The basics of programming in | R’ right now. Are you sure you have an internet connection? If so, would you | like to try again or visit the course repository for instructions on how to | install a course manually? Type 0 to exit. 1: Try again! 2: Send me to the course repository for manual installation. Selection: 0 | Leaving swirl now. Type swirl() to resume. warning messages from top-level task callback 'mini' Warning messages: 1: In dir.create(udat, recursive = TRUE) : cannot create dir '/usr/lib64/R/library/swirl/user_data', reason 'Permission denied' 2: In file(con, "wb") : cannot open file '/usr/lib64/R/library/swirl/Courses/temp.zip': Permission denied 3: In file(con, "wb") : cannot open file '/usr/lib64/R/library/swirl/Courses/temp.zip': Permission denied > swirl() | Welcome to swirl! | Please sign in. If you've been here before, use the same name as you did | then. If you are new, call yourself something unique. What shall I call you? SS | Thanks, SS. Let's cover a few quick housekeeping items before we begin our | first lesson. First of all, you should know that when you see '...', that | means you should press Enter when you are done reading and ready to continue. ... <-- That's your cue to press Enter to continue | Also, when you see 'ANSWER:', the R prompt (>), or when you are asked to | select from a list, that means it's your turn to enter a response, then press | Enter to continue. Select 1, 2, or 3 and press Enter 1: Continue. 2: Proceed. 3: Let's get going! Selection: 1 | You can exit swirl and return to the R prompt (>) at any time by pressing the | Esc key. If you are already at the prompt, type bye() to exit and save your | progress. When you exit properly, you'll see a short message letting you know | you've done so. | When you are at the R prompt (>): | -- Typing skip() allows you to skip the current question. | -- Typing play() lets you experiment with R on your own; swirl will ignore | what you do... | -- UNTIL you type nxt() which will regain swirl's attention. | -- Typing bye() causes swirl to exit. Your progress will be saved. | -- Typing main() returns you to swirl's main menu. | -- Typing info() displays these options again. | Let's get started! ... | To begin, you must install a course. I can install a course for you from the | internet, or I can send you to a web page | (https://github.com/swirldev/swirl_courses) which will provide course options | and directions for installing courses yourself. (If you are not connected to | the internet, type 0 to exit.) 1: R Programming: The basics of programming in R 2: Regression Models: The basics of regression modeling in R 3: Don't install anything for me. I'll do it myself. Selection: 1 | Sorry, but I'm unable to fetch ‘R Programming: The basics of programming in | R’ right now. Are you sure you have an internet connection? If so, would you | like to try again or visit the course repository for instructions on how to | install a course manually? Type 0 to exit. 1: Try again! 2: Send me to the course repository for manual installation. Selection: 0 | Leaving swirl now. Type swirl() to resume. warning messages from top-level task callback 'mini' Warning messages: 1: In dir.create(udat, recursive = TRUE) : cannot create dir '/usr/lib64/R/library/swirl/user_data', reason 'Permission denied' 2: In file(con, "wb") : cannot open file '/usr/lib64/R/library/swirl/Courses/temp.zip': Permission denied >