我怎么能在R中构建一个exe文件

时间:2016-02-24 13:22:53

标签: r

我写了一个效果很好的函数。我想为它构建一个exe文件。 我在网上搜索,我找到了http://www.r-bloggers.com/making-r-files-executable-under-windows/。但有些东西在我的窗户上不起作用。 “没有任何东西可以点击是” 我在Windows 7上使用R版本3.2.3。 这是我的功能:

fun <- function(){
    x <- readline("Is it big?")
    if(x == "yes"){
        y <- readline("Is its neck tall?")
        if(y == "yes"){out <- "It is giraffe."}
        else{
            u <- readline("Does it have proboscis?")
            if(u == "yes"){out <- "It is elephant."}
            else{
                v <- readline("Is it aquatic?")
                if(v == "yes"){out <- "It is hippopotamus."}
                else{out <- "It is Rhino."}
            }}}
    else{
        z <- readline("Is it shreiking?")
        if (z=="yes"){out <- "It is mouse."}
        else {out <- "It is squirrel."}
    }
    return(out)
}

感谢您的回答。

1 个答案:

答案 0 :(得分:0)

据我所知,您无法从R脚本制作.exe文件...如果您希望您的代码是交互式的,请尝试Shiny。