Displaying 3 results from an estimated 3 matches for "timeseriesexample".
2017 Oct 05
0
Adding non-data line to legend ggplot2 Maximum Contaminant Level
...n words, I created a new data.frame with "250" in the Chloride vector and "SMCL" in the Detections vector and supplessed one legend.
Warning: For my convenience I am using different data.frame names .
library(ggplot2)
MyData <-read.csv("http://doylesdartden.com/Stats/TimeSeriesExample.csv", sep=",")
MyData$Detections <- ifelse(MyData$D_Chloride ==1, "Detected", "NonDetect")
dat1 <-? MyData[, c(1, 3, 4, 6)]
dat2 <-? dat1[, c(1,2)]
dat2$Detections <-? rep("SMCL", nrow(dat2))
dat$Chloride <-? rep(250, nrow(dat2))
dat...
2017 Sep 26
2
Adding non-data line to legend ggplot2 Maximum Contaminant Level
...dary Maximum Contaminant Level in
the legend. Any thoughts? My code is as following and is linked to my
data on the net.
Thank you in advance
David
#Loads the ggplot2 package.
library(ggplot2)
##This loads your data from your worksheet
MyData <-read.csv("http://doylesdartden.com/Stats/TimeSeriesExample.csv",
sep=",")
#Sets which are detections and nondetects
MyData$Detections <- ifelse(MyData$D_Chloride ==1, "Detected", "NonDetect")
#does the plot
p <- ggplot(data = MyData, aes(x=Year, y=Chloride , col=Detections)) +
geom_point(aes(shape=Detections))...
2017 Oct 01
0
Adding non-data line to legend ggplot2 Maximum Contaminant Level
...dary Maximum Contaminant Level in
the legend.? Any thoughts?? My code is as following and is linked to my
data on the net.
Thank you in advance
David
#Loads the ggplot2 package.
library(ggplot2)
##This loads your data from your worksheet
MyData <-read.csv("http://doylesdartden.com/Stats/TimeSeriesExample.csv",
sep=",")
#Sets which are detections and nondetects
MyData$Detections <- ifelse(MyData$D_Chloride ==1, "Detected", "NonDetect")
#does the plot
p <- ggplot(data = MyData, aes(x=Year, y=Chloride , col=Detections)) +
? geom_point(aes(shape=Detections))...