Home>
I want to create a line chart
And I used the data of https://github.com/kaz-ogiwara/covid19/blob/master/data/summary.csv.
But the graph was not plotted.
Removed 2 row(s) containing missing values (geom_path).
Applicable source code
CovidJP<- read.csv("summary.csv")
g<- ggplot(CovidJP, aes(x = month, y = hospitalized))
g<- g + geom_line()
plot(g)
What I tried
There were two missing values in y, so I thought that was the cause, and I tried to remove it by changing it like ggplot(subset(CovidJP, !is.na(y)),aes(x = month, y = hospitalized)), but the same I got an error.
Supplemental information (FW/tool version, etc.)Rstudio
Please provide more detailed information here.
-
Answer # 1
Related articles
- python - cannot create table with foreignkey in sqlalchemy
- statistics rcmdr cannot be used
- cannot create a function that satisfies python max<x<min
- cannot create folder in network folder with c#
- python - i want to create a graph with a range for each value
- cannot load r package
- python - how to create a jagged log graph
- vba:"activex component cannot create object" error
- mysql - [sql] cannot create table
- ubuntu+docker cannot create php environment
- [python] how to create a graph
- python - create a line graph using matplotlib
- create a graph in c ++ (when the applied function differs depending on the range)
- ubuntu - cannot create secret while creating mastodon instance
- cannot use package forecast in r language
- [ios/swift] i want to create a graph
- i want to create a category that is classified into 3 by case_when from continuous variables
- python keras valueerror: cannot create group in read-only mode
- python - how to create a 3d graph with output values using matplotlib and numpy
Related questions
- r : Change ggplot legend options
- regarding the method to output the histograms of all columns at once
- changing the shape and color of dot plot of ggplot
- r - about handling geom_vline in ggplot2
- i don't know how to format data for graph drawing with r and ggplot
- coastline plot in r
- r - i want to use a function instead of opts in ggplot2
- i want to specify the bubble color using variables in the data frame with ggplot2 of r
- [r] method to output boxplot graph of r by condition (aes(fill=●●) cannot be used for color coding)
is.na(CovidData)
As you can see immediately by executing, is.na only returns whether it is NA, so its output cannot be used as it is as graphing data.If you use
na.omit
I guess. However, I think that the graph will not be meaningful unless pre-processing such as taking the total value for each month is performed.