[R] Removing a data subset

2017-11-29 Thread David Doyle
Say I have a dataset that looks like LocationYear GW_Elv MW011999 546.63 MW021999 474.21 MW031999 471.94 MW041999466.80 MW012000545.90 MW022000546.10 The whole dataset is at http://doylesdartden.com

Re: [R] Removing a data subset

2017-11-30 Thread David Doyle
Thank Rainer and Jim!! The end result was: #Makes a new data set name "MyData_Minus_MW01" that contains all the data where the Location Column is not equal to MW01 and the comma after that ensures that all columns are copied into the amended data.frame. MyData_Minus_MW01 <- MyData[ MyData$Location

[R] Plotting Notched Box Plots Log Scale - Losing bottom portion of box plot

2018-03-21 Thread David Doyle
Hello, I'm using the code below to generate some notched box plots. The issue is whenever I use log scale, the sides of the bottom part of the box plots don't plot. I've tried it in RStudio Ver 1.1.419 and R version 3.4.3 and I get the same result. The code and link to my data is below. Thank

[R] Adding non-data line to legend ggplot2 Maximum Contaminant Level

2017-09-26 Thread David Doyle
Hello everyone, I have a plot showing chloride concentrations for various point over time. I also have a dotted line that show the Secondary Maximum Contaminant Level (my screening limit) on the graphs at 250 mg/L. But I can not figure out how to include the dotted line / Secondary Maximum Contam

[R] Transforming data for nice output table

2018-08-20 Thread David Doyle
74.67 775.57 127(I)752.46 752.06 XX XX Any thoughts on how to transform the data so it would be in this format?? Thank you for your time David

[R] Logic operators...more than one??

2018-10-03 Thread David Doyle
I'm sure this is a simple question but I'm not sure where to find the answer. I want to remove some of the data. For example when my Location column is MW-09, MW-10, or MW-11. It works fine if I ONLY list ONE of the locations as in: SampledWells <- MyData[ MyData$Location != "MW-09", ] But if

[R] Colors on box plots in ggplot

2019-01-17 Thread David Doyle
Hello, I'm trying to set different boxes to different colors the following page shows http://www.sthda.com/english/wiki/ggplot2-box-plot-quick-start-guide-r-software-and-data-visualization I've tried the code ToothGrowth$dose <- as.factor(ToothGrowth$dose) head(ToothGrowth) library(ggplot2) # Ba

[R] kruskal test p value way too low.

2014-10-25 Thread David Doyle
Hello, I'm trying to run kruskal test on some data but the p values seemed way too low. So I tried it on some similar data and still got p-value = 1.611e-09. I'm sure it is a simple mistake but I can't figure it out. Below is my data and code. Could it be because there are some miss data / NAs

Re: [R] kruskal test p value way too low.

2014-10-26 Thread David Doyle
Thank for your help!! That took care of the problem! Thank you again David "Kentucky Geologist trying to learn R" Doyle On Sun, Oct 26, 2014 at 12:37 AM, Rolf Turner wrote: > On 26/10/14 16:40, David Doyle wrote: > >> Hello, >> >> I'm trying to run kru

[R] Box Plot size and labels

2014-10-26 Thread David Doyle
it on the graph?? My data and code are below Thank you for your time. David Doyle MS <- read.table("http://www.doylesdartden.com/R/MS.csv";, header=TRUE, sep=",",) #Sets whic are detections and nondetects MS$Detections <- ifelse(MS$D_AMMONIA==1, "Detected&q

Re: [R] Plot size

2014-10-26 Thread David Doyle
de code completion for you as you > type the code chunk header. > > Dennis > > On Sun, Oct 26, 2014 at 6:03 PM, David Doyle > wrote: > > Hi Folks, > > > > I'm trying to adjust the plot size so it can be pulled into a document by > > Rmarkdown. Any sug

[R] Order of boxs in box plots

2014-10-27 Thread David Doyle
a way I can control that?? My data and code are below. Thank you for your time David Doyle MS <- read.table("http://www.doylesdartden.com/R/MS.csv";, header=TRUE, sep=",",) MSAmmoniax <- c("Well", "AMMONIA") MSAmmonia <- MS[MSAmmoniax] plot(MSAmm

[R] Rose Diagrams for Geology

2014-11-18 Thread David Doyle
package but it seems to deal only in radian and we normally use degrees. I've also looked a little at openair being rose diagrams are often used for wind directions. Any suggestions / guidance would be greatly appreciated. Thank you for your time. David Doyle [[alternative HTML ve

Re: [R] Rose Diagrams for Geology

2014-11-18 Thread David Doyle
http://www.inside-r.org/packages/cran/circular/docs/rose.diag Example of my data JointsDegrees JointsRad 30 0.523598776 34 0.593411946 35 0.610865238 35 0.610865238 37 0.645771823 37 0.645771823 On Tue, Nov 18, 2014 at 5:16 PM, David Winsemius wrote: > > On Nov 18, 2014, at 1:42 PM, Davi

[R] ggplot2 different Y axis scales

2015-11-06 Thread David Doyle
06 to have a Y axis scale from 0 - 40 I am using RStudio version 0.99.484 R i386 3.2.2 ggplott2 ver 1.0.1 in a Windows 7 environment. Thank you for your time David Doyle library(ggplot2) SS <-read.csv("http://doylesdartden.com/Stats/SS.csv";, sep=",") #Sets whic are

Re: [R] ggplot2 different Y axis scales

2015-11-08 Thread David Doyle
n use scales = "free_y" to allow different > y-scales for the response in each facet, but you do not have the > ability to control the ranges of the y-scales in each facet. That is > controlled by the training process for scales in ggplot2. Generally > speaking, it should be pret

[R] Broken line questions

2013-05-11 Thread David Doyle
Hello Everyone, I have some data that like most real world data isn't complete. I'm trying to plot all of it together with lines connecting the data points. Because I have breaks in the data I have breaks in the lines. Is there a way that the lines will connect all the markers??? Below is the

[R] Trying to install NADA in R 3.0.0

2013-06-07 Thread David Doyle
Hello folks, I’m trying to install the NADA package in R 3.0.0 It has been archived so I tried to downloading it and installing it locally. I get > utils:::menuInstallLocal() package ‘NADA’ successfully unpacked and MD5 sums checked But then when I load it I get > library(NADA) Error in l

Re: [R] Trying to install NADA in R 3.0.0

2013-06-08 Thread David Doyle
ts what is archived, and what I'm using with R 3.0. Hope it is of use to you. Regards, Dennis Helsel On Fri, Jun 7, 2013 at 6:15 PM, Janh Anni wrote: > Try contacting Dr Dennis Helsel, the developer at > dhel...@practicalstats.com > > > On Fri, Jun 7, 2013 at 1:47 PM, David

[R] Doing box plots for part of the data??

2014-04-03 Thread David Doyle
HI folks I'm wanting to do box plots of just 2 of my wells. I can do it for all of them by using boxplot(Barium~Well.ID,data=mydata, main="Barium", ylab="mg/L") to do for all 4 wells Anyone have a sugestion on how to do it for only 2 wells like MW-1 and MW-2? The data can be found? http://www.

[R] Plotting does odd line thing

2014-04-07 Thread David Doyle
Hello folks, When I use the lines function below it connects all my points but then draws a line back to the start point. Any suggestions on what is going on?? mydata <-read.csv("http://doylesdartden.com/R/test_data.csv";, sep=",") attach(mydata) plot(EMD~Year,data=mydata, subset = Well.ID %in

Re: [R] Plotting does odd line thing

2014-04-08 Thread David Doyle
> T +45 9730 5135 > M +45 2547 6050 > fr...@vestas.com > http://www.vestas.com > > Company reg. name: Vestas Wind Systems A/S > This e-mail is subject to our e-mail disclaimer statement. > Please refer to www.vestas.com/legal/notice > If you have received this e-mail in er

[R] Plotting nondetects a different color

2011-05-31 Thread David Doyle
I often have data sets that have nondetects in them. For example Result Detected ( 0=No 1=Yes) 14 1 20 1 100 191 120 9 1 151 I would like to be able to plots with the NonDetects one c

[R] Confidence bands around LOESS

2012-08-07 Thread David Doyle
Hi Folks, I'm looking to do Confidence bands around LOESS smoothing curve. If found the older post about using the Standard error to approximate it https://stat.ethz.ch/pipermail/r-help/2008-August/170011.html Also found this one http://www.r-bloggers.com/sab-r-metrics-basics-of-loess-regression

[R] Installing Kendall Package

2012-04-16 Thread David Doyle
I know this is a dumb question but I'm pulling out what little hair I have left. I download the package and got the following: trying URL ' http://ftp.ussg.iu.edu/CRAN/bin/windows/contrib/2.14/Kendall_2.2.zip' Content type 'application/zip' length 52732 bytes (51 Kb) opened URL downloaded 51 Kb

[R] SmoothTrend in OpenAir

2012-04-19 Thread David Doyle
I'm trying to plot smooth trend using smoothTrend in OpenAir but I'm having problems. I used the following code. - #Set my working dir to the dir with my files setwd("c:/R") #Load the openair library library(openair)

[R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-23 Thread David Doyle
Hi folks. If I have the following in my "data" eventpH1pH2 14.0 6.0 24.3 5.9 34.1 6.1 44.0 5.9 and on and on. for about 400 events Is there a way I can get R to plot event vs. pH1 and event vs. pH2 and then do a loess o

Re: [R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-24 Thread David Doyle
acet_wrap(~factor(pH1)) > > or something similar. > > Michael > > On Mon, Apr 23, 2012 at 11:26 PM, David Doyle > wrote: > > Hi folks. > > > > If I have the following in my "data" > > > > eventpH1pH2 > > 14.0 6.0

Re: [R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-24 Thread David Doyle
gt; > The scatter plot is easy: > > > > plot(pH1 ~ pH2, data = OBJ) > > > > When you say a loess for each -- how do you break them up? Are there > > repeat values for pH1? If so, this might be hard to do in base > > graphics, but ggplot2 would make it easy: > &

Re: [R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-24 Thread David Doyle
Hi Greg, Sloved my own problem. I had some missing data "NA" in the datasets. So I manually entered the ylim=range(4,6) and it worked!!! Thanks!! David On Tue, Apr 24, 2012 at 1:55 PM, David Doyle wrote: > Hi Greg, > > Thanks, > > I got the 1st example to work

Re: [R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-30 Thread David Doyle
First let me say thank you for all the help everyone gave me. Below is the code I came up with to look at Rainfall pH reading for Kentucky and Tennessee. Also there is a more *generic* ver of the code on my web page if anybody ever needs it in the future. http://sites.google.com/site/davidsstatis