Awareness: Awareness

Usage Arguments Examples

View source: R/Awareness.R

Usage

1
Awareness(choice)

Arguments

choice

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (choice) 
{
    if (!(getwd() == "C:/Users/zsz/Desktop/STAT-545 GLM/Final Project/")) {
        cat("Choose Your Default Dir:", "\n")
        dir <- choose.dir()
        setwd(dir)
    }
    if (choice == 99) {
        Sys.sleep(2)
        centerText(paste0("Robot 00001 lauched", " Start Learning..."))
        cat("\n")
        Sys.sleep(2)
        cat("Initialization", "\n")
        Sys.sleep(2)
        cat("Security System Activated", "\n")
        library(getPass)
        Sys.sleep(2)
        cat("Information System Attached", "\n")
        library(mailR)
        Sys.sleep(2)
        cat("Sentiment Recognition Component Checking", "\n")
        library(syuzhet)
        cat("Naive Bayes Classification Machine Loading ...", 
            "\n")
        library(tm)
        library(e1071)
        cat("Generalized Linear Regression Classifier Loading ...", 
            "\n")
        library(glmnet)
        cat("Neural Net Work Self Checking ...", "\n")
        Sys.sleep(2)
        cat("Warning! Neural Net Work is not activated", "\n")
        Sys.sleep(2)
        cat("\n")
    }
    centerText(paste0("What do you want to do Master?"))
    cat("\n")
    choice <- readline(prompt = paste0("1. Create Profile", "\n", 
        "2. Sentiment Analysis", "\n", "3. Classifier", "\n", 
        "4. Send Email", "\n", "5. Lauch Crawler", "\n", "100. Do something else", 
        "\n"))
    return(as.numeric(choice))
    if (choice == 0) {
        centerText("What do you want to do Master?", "\n")
        choice <- readline(prompt = paste("1. Create Profile", 
            "\n", "2. Sentiment Analysis", "\n", "3. Classifier", 
            "\n", "4. Send Email", "\n", "5. Lauch Crawler", 
            "\n", "100. Do something else", "\n"))
        choice <- as.numeric(choice)
    }
  }

pingqingsheng/Robot0001 documentation built on May 5, 2019, 5:53 p.m.