R 不知道如何转换';日期';至第“类;日期”;?
为什么我在RStudio上得到以下行的错误: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 当
# 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