添加站点扩展后,无法在Azure上运行R功能

时间:2017-09-01 14:16:51

标签: r azure azure-functions

我对R来说是全新的,所以我必须错过一些简单的想法。

我试图了解如何将R代码作为Azure函数运行。我按照this示例进行了简化,我用

替换了script.r文件

print("Testing R")

但是当我运行此函数时,我在命令行中看到以下内容:

2017-09-01T14:07:52.388 Function started (Id=c031b7fc-1047-442e-8589-8cc6e7a96b48)
2017-09-01T14:07:54.407 Loading required package: httr
2017-09-01T14:07:54.611 Loading required package: jsonlite
2017-09-01T14:07:54.689 Loading required package: methods
2017-09-01T14:07:55.174 Loading required package: ggplot2
2017-09-01T14:07:57.624 Loading required package: twitteR
2017-09-01T14:07:58.943 Loading required package: rsvg
2017-09-01T14:07:59.366 Loading required package: rjson
2017-09-01T14:07:59.413 Attaching package: 'rjson'
2017-09-01T14:07:59.429 The following objects are masked from 'package:jsonlite':

    fromJSON, toJSON
2017-09-01T14:07:59.976 Error: Please install xml2 package
2017-09-01T14:07:59.976 In addition: Warning message:
In strptime(x, fmt, tz = "GMT") : unable to identify current timezone 'C':
please set environment variable 'TZ'
2017-09-01T14:07:59.976 Execution halted
2017-09-01T14:08:00.028 Function completed (Success, Id=c031b7fc-1047-442e-8589-8cc6e7a96b48, Duration=7637ms)

关于我缺少什么的任何想法?

1 个答案:

答案 0 :(得分:0)

我也遵循了这个例子,它在我身边工作得很好。

enter image description here

您似乎未在自己提供的the doc中的第5步中运行以下命令。

unzip -n D:\home\SiteExtensions\R-3.3.3x64\R-3.3.3.zip -d D:\home