r - seq.int(0, to0 - from, by) : 'to' 必须是有限数
问题描述
我有一个项目,我有 error = "error in seq.int(0, to0 - from, by) : 'to' must be afinite number" 这是代码。大家能帮忙吗?
library(ggplot2)
library(dplyr)
library(plyr)
library(tidyverse)
library(DataExplorer)
library(ggrepel)
raw_data = mutate(raw_data, Date.Announced= as.Date(Date.Announced, format="%d/%m/%y"))
raw_data = raw_data[order(as.numeric(raw_data$Date.Announced)),]
daily_rate = raw_data[,c("Date.Announced" , "Patient.Number")]
count_daily = count(daily_rate,"Date.Announced")
count_daily
ggplot(count_daily, aes(x=Date.Announced, y=freq)) +
geom_segment( aes(x=Date.Announced, xend=Date.Announced, y=0, yend=freq),
color="red") +
geom_point( color="orange", size=1) +
theme_light() +
scale_x_date(date_breaks = "1 week",date_labels = "%d %b")+
theme(
panel.grid.major.x = element_blank(),
panel.border = element_blank(),
axis.ticks.x = element_blank()
) +
xlab("") +
labs(title = "Daily Increase in the Number of Patients")+
ylab("Number of patients")
我知道这是与日期格式有关的错误,但我不知道如何解决它。
解决方案
推荐阅读
- c# - 如何使用 C# 中的“System.Runtime.Serialization.Json”类反序列化带有字符串数组的 JSON?
- c# - RegEx 不适用于 DocuSign 进行文本验证
- ios - 不变的违规文本字符串必须在
零件 - windows - 有人可以建议为什么从源代码(1.4)构建的 Go 由于 GCC 编译错误而失败,即使 CGO_ENABLED=0
- html - 内容和页脚之间的空间
- java - Spring State Machine - 为什么文档使用静态类
- azure - Azure Web App - 是否可以将自定义域放入虚拟应用程序
- android - 将编辑后的值从回收者视图传递给活动
- reactjs - 如何处理 react、react-dom、@types/react 和 @types/react-dom 包版本?
- c# - 如何在选择表达式中重用子查询?