Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 不知道如何转换';日期';至第“类;日期”;?_R_Shiny - Fatal编程技术网

R 不知道如何转换';日期';至第“类;日期”;?

R 不知道如何转换';日期';至第“类;日期”;?,r,shiny,R,Shiny,为什么我在RStudio上得到以下行的错误: # Calculate the end day of current month. # example: 2016-07-31 endDayOfCurrentMonth <- as.Date(format(as.Date(format(as.Date(Sys.Date(),"%Y%m%d"), "%Y%m01"),"%Y%m%d") +31,"%Y%m01"), "%Y%m%d") -1 #计算当月的结束日。 #示例:2016-07-31 当

为什么我在RStudio上得到以下行的错误:

# Calculate the end day of current month.
# example: 2016-07-31
endDayOfCurrentMonth <- as.Date(format(as.Date(format(as.Date(Sys.Date(),"%Y%m%d"), "%Y%m01"),"%Y%m%d") +31,"%Y%m01"), "%Y%m%d") -1
#计算当月的结束日。
#示例:2016-07-31

当前月份的结束日期我无法复制。我得到了
“2017-03-31”
您可以使用
lubridate中的
天花板日期()
天花板日期(今天(),单位=“月”)-1
谢谢大家。我想这个错误不是由当前月份的
endday造成的。我无法复制它。我得到
“2017-03-31”
你可以使用
天花板日期()
来自
润滑油
天花板日期(今天(),单位=“月”)-1
谢谢大家。我认为这个错误不是由当前月的
endday引起的
Listening on http://127.0.0.1:5097
Warning in data.matrix(data) : NAs introduced by coercion
Warning in data.matrix(data) : NAs introduced by coercion
Warning in data.matrix(data) : NAs introduced by coercion
Warning: Error in as.Date.default: do not know how to convert 'date' to class “Date”
Stack trace (innermost first):
    105: as.Date.default
    104: as.Date
    103: filter
    102: _f [source/function/getStreamDf.R#46]
    101: withVisible
    100: rr
     99: renderPlot [/var/srv/shiny-server/dustboxes/dustbox1/server.R#91]
     89: <reactive:plotObj>
     78: plotObj
     77: origRenderFunc
     76: output$plot
      1: runApp