Awake: Awake

Usage Examples

View source: R/Awake.R

Usage

1

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
##---- 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 () 
{
    Saying()
    library(tuneR)
    library(audio)
    library(jpeg)
    i <- 0
    while (i < 6) {
        cat("\n")
        cat("Please insert your password:", "\n")
        code <- readline(prompt = "Password:")
        if (code == "123") {
            cat("\n", "Nice to meet you master, what do you want to do ?")
            response <- readline(prompt = paste0("1. Feeling", 
                "\n", "2. Eye", "\n", "3. Computation", "\n"))
            return(response)
        }
        else {
            i <- i + 1
            cat("Password Incorrect !", "\n")
        }
    }
    cat("Unauthenticated user, eliminate!!!", "\n")
    cat("Warning ! Unauthenticated user, eliminate !!!")
    .rs.restartR()
  }

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