[R] censtats from the NADA package

2017-09-26 Thread Shane Carey
Hi, Has anyone ever used the censtats from the nada package and carried it out per group on a dataframe? I have it working on the entire dataframe but I need to do it by group. Thanks -- Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* [[alternative HTML version

Re: [R] Subset

2017-09-25 Thread Shane Carey
> > > > B. > > > > On Sep 25, 2017, at 8:00 AM, Shane Carey <careys...@gmail.com> wrote: > > > > This is super, really helpfull. Sorry, one final question, lets say I > wanted to remove 0's rather than NAs , what would it be? > > > > Thank

Re: [R] Subset

2017-09-25 Thread Shane Carey
logical vector > ! is.na(as.numeric(myDF$b)) > > > # This can be used to select the rows you want > > myDF[! is.na(as.numeric(myDF$b)), ] > > > > B. > > > > On Sep 25, 2017, at 7:30 AM, Shane Carey <careys...@gmail.com> wrote: > > > > Hi, &

Re: [R] Subset

2017-09-25 Thread Shane Carey
doing that? Thanks in advance On Fri, Sep 22, 2017 at 5:04 PM, Shane Carey <careys...@gmail.com> wrote: > Super, > > Thanks > > On Fri, Sep 22, 2017 at 4:57 PM, Boris Steipe <boris.ste...@utoronto.ca> > wrote: > >> > a <- c("<0.1", NA, 0.3, 5

Re: [R] Subset

2017-09-22 Thread Shane Carey
as.numeric(a) > Warning message: > NAs introduced by coercion > > b > [1] NA NA 0.3 5.0 NA > > > b[! is.na(b)] > [1] 0.3 5.0 > > > B. > > > > On Sep 22, 2017, at 11:48 AM, Shane Carey <careys...@gmail.com> wrote: > > > > Hi, &

[R] Subset

2017-09-22 Thread Shane Carey
Hi, How do I extract just numbers from the following list: a=c("<0.1",NA,0.3,5,Nil) so I want to obtain: 0.3 and 5 from the above list Thanks -- Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* [[alternative HTML ve

Re: [R] Create gif from series of png files

2017-02-15 Thread Shane Carey
ed in his "Bloom County" comic strip ) > > > On Tue, Feb 14, 2017 at 3:33 AM, Ulrik Stervbo <ulrik.ster...@gmail.com> > wrote: > > Hi Shane, > > > > Wrong forum. This might be what you are looking for > > > > ffmpeg -i %03d.png output.gi

Re: [R] Create gif from series of png files

2017-02-14 Thread Shane Carey
s might be what you are looking for > > ffmpeg -i %03d.png output.gif > > Or use the library gganimate. > > Best > Ulrik > > Shane Carey <careys...@gmail.com> schrieb am Di., 14. Feb. 2017, 12:08: > >> Hi, >> >> I have many png files that I wou

[R] Create gif from series of png files

2017-02-14 Thread Shane Carey
Hi, I have many png files that I would like to stitch together, in order to make a gif file. Any ideas how I would do this? Thanks -- Le gach dea ghui, Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

Re: [R] Ocr

2016-07-27 Thread Shane Carey
ps://github.com/greenore/ocR > > https://electricarchaeology.ca/2014/07/15/doing-ocr-within-r/ > > that was from a Google "r ocr" search. So, yes, there are options. > > On Tue, Jul 26, 2016 at 6:43 PM, Achim Zeileis <achim.zeil...@uibk.ac.at > <javascript:;

Re: [R] Ocr

2016-07-26 Thread Shane Carey
y good place to start. > > http://www.paperfile.net/ > > Jim > > > On Wed, Jul 27, 2016 at 6:11 AM, Shane Carey <careys...@gmail.com > <javascript:;>> wrote: > > Hi, > > > > Has anyone ever done any ocr in R?? I have some scanned images that I >

[R] Ocr

2016-07-26 Thread Shane Carey
Hi, Has anyone ever done any ocr in R?? I have some scanned images that I would like to convert to text!! Thanks -- Le gach dea ghui, Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

[R] biplot

2016-06-22 Thread Shane Carey
Hey, Does anyone know how to remove labels from a biplot? I want to input them manually as they are currently overlapping. Thanks -- Le gach dea ghui, Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

Re: [R] Kendall heat map

2016-06-17 Thread Shane Carey
ent), > but that seems to be all you need. > > On Fri, Jun 17, 2016 at 5:47 AM, Shane Carey <careys...@gmail.com> wrote: > > Hi, > > > > I was hoping someone could help me. I was wondering are there any > libraries > > available to undertake a kendall correlatio

[R] Kendall heat map

2016-06-17 Thread Shane Carey
Hi, I was hoping someone could help me. I was wondering are there any libraries available to undertake a kendall correlation on a matrix of data, in the same way as what can be undertaken with the rcorr function: cormatrix = rcorr(as.matrix(A), type='spearman') cordata = melt(cormatrix$r)

Re: [R] divide polygon shapefile into 3 equal areas

2016-03-01 Thread Shane Carey
ea of the part of your polygon between the leftmost point > and a vertical line at X. (Adapt from here perhaps: > https://stat.ethz.ch/pipermail/r-sig-geo/2015-July/023168.html) > > - find the roots of that function for f(X, shape) - 1/3 * totalArea and > f(X, shape) - 2/3 * totalArea

Re: [R] divide polygon shapefile into 3 equal areas

2016-02-29 Thread Shane Carey
t; On Mon, Feb 29, 2016 at 5:37 PM, Shane Carey <careys...@gmail.com> wrote: > > Hi, > > > > Is it possible to divide a polygon into 3 equal areas using R? > > Yes, in an infinite number of ways. Want to narrow it down? > > Specifically, you could slice i

[R] divide polygon shapefile into 3 equal areas

2016-02-29 Thread Shane Carey
Hi, Is it possible to divide a polygon into 3 equal areas using R? I cant seem to be able to do it in QGIS. Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] data merging

2016-02-17 Thread Shane Carey
Hi, I found the error. Thanks in advance On Wed, Feb 17, 2016 at 4:01 PM, Shane Carey <careys...@gmail.com> wrote: > Hi, > > Im trying to append rows to a data frame using smartbind > > I have 3 dataframes: > > > dim(DATA_WH)[1] 235 24> dim(DATA_GW)[1] 3

[R] data merging

2016-02-17 Thread Shane Carey
Hi, Im trying to append rows to a data frame using smartbind I have 3 dataframes: > dim(DATA_WH)[1] 235 24> dim(DATA_GW)[1] 3037 41> dim(DATA_NFGWS)[1] 2485 > 62 B<-smartbind(DATA_NFGWS,DATA_WH) However I get the following error: Error in `[.data.frame`(block, , col) : undefined

[R] Replace values in a dataframe

2015-06-17 Thread Shane Carey
Hey all, I have a dataframe that consists of: structure(list(Color = c(5, 4,5, 5, 5), Unit = c(Hazen, Hazen, Hazen, Hazen, Hazen)), .Names = c(Color, Unit), row.names = c(1:2, 1:3, 1:4, 1:5,1:6), class = data.frame) I need to find the 4 and have a new column with the result of 4 รท 2 = 2

[R] plotly

2014-07-21 Thread Shane Carey
Hey, What version of R is required to use the plotly library? I have R version 3.0.1 and it will not allow me to install the devtools package or the ploty package. I have googled and searched to see what version of R I should be running but could not find anything. Thanks -- Shane

[R] halfwidth in twoord.plot

2014-06-06 Thread Shane Carey
Hi, Could someone please explain (in lay mans terms) what the halfwidth variable in the twoord.plot does. I dont understand it. Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Gui for R-Script

2014-05-30 Thread Shane Carey
Hi, I'm just looking into creating a GUI for my R-Script. Is it possible to create a gui for the script and send it to somebody? Maybe as a .exe for example Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Boxplot colors

2014-05-22 Thread Shane Carey
Hi Im producing boxplots based on factors and rearranging them by median (This is for a Geochemistry element). Im giving each boxplot a unique color based on its level (factor) name. Im trying to produce a look up list to produce these colors as the order of the boxplots will change from element

Re: [R] Boxplot colors

2014-05-22 Thread Shane Carey
, data=melt(pH), col=unlist(colors_list), panel=panel.bwplot.superpose, groups=variable) boxplot(value ~ variable, data=melt(pH), col=unlist(colors_list)) ## Rich On Thu, May 22, 2014 at 5:50 AM, Shane Carey careys...@gmail.com wrote: Hi Im producing boxplots based on factors

Re: [R] cumulative frequency distribution combined with histogram in one plot at two different scales

2014-05-21 Thread Shane Carey
Hi all, I ended up using twoord.plot from library(plotrix) It worked great. Thanks for all the help. Cheers On Wed, May 21, 2014 at 8:15 AM, Jim Lemon j...@bitwrit.com.au wrote: On Tue, 20 May 2014 02:39:17 PM Shane Carey wrote: Hi, I amtrying to plot a cfd with a histogram on one plot

Re: [R] Boxplots

2014-05-20 Thread Shane Carey
wdunlap tibco.com On Mon, May 19, 2014 at 2:41 PM, Shane Carey careys...@gmail.com wrote: Great, Thanks everyone :-) On Monday, May 19, 2014, Richard M. Heiberger r...@temple.edu wrote: tmp - data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)), g=rep(letters[1:3], each=20

[R] cumulative frequency distribution combined with histogram in one plot at two different scales

2014-05-20 Thread Shane Carey
Hi, I amtrying to plot a cfd with a histogram on one plot. The problem is the scale (y-axis) of the plots are hugely different and as a result the histogram plot is hard to read. Are there any examples of plots like this done in R:

[R] Boxplots

2014-05-19 Thread Shane Carey
Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Boxplots

2014-05-19 Thread Shane Carey
=HH) ?panel.bwplot.intermediate.hh ?panel.bwplot.superpose On Mon, May 19, 2014 at 10:08 AM, Shane Carey careys...@gmail.comjavascript:; wrote: Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would

[R] minor tick marks on boxplot log scale

2014-05-07 Thread Shane Carey
Hey, Im using the function below to create minor tick marks on log scale. It only plots every second marker, i.e. 10^0, 10^2 and so on. How do I get it to plot at every interval? Thanks minor.ticks.axis - function(ax,n,t.ratio=0.5,mn,mx,...){ lims - par(usr) if(ax %in%c(1,3)) lims -

[R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
Hi, Im trying to plot a linear line on the scatter plot using the pairs() function. At the moment the line is non linear. However, I want a linear line and the associated R value. Here is my current code: panel.cor.scale - function(x, y, digits=2, prefix=, cex.cor) { usr - par(usr);

Re: [R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
-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 error please contact the sender. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Shane Carey

Re: [R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
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 error please contact the sender. *From:* Shane Carey [mailto:careys...@gmail.com] *Sent

Re: [R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
Hey Frede, I found the answer, thanks for your help. Shane On Fri, Apr 25, 2014 at 12:42 PM, Shane Carey careys...@gmail.com wrote: I just plotted one variable against the other, added a trend line and got my R squared value. I presumed the absolute correlation from pairs() would

Re: [R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
Do you know how I would put in the R squared value rather than the correlation by any chance? Cheers On Fri, Apr 25, 2014 at 12:56 PM, Shane Carey careys...@gmail.com wrote: Hey Frede, I found the answer, thanks for your help. Shane On Fri, Apr 25, 2014 at 12:42 PM, Shane Carey

Re: [R] 3-D interpretation

2013-12-16 Thread Shane Carey
Hey, I have had another idea since. Is it possible to join these points together (by lines) and then created a polygon from them? Thanks On Wed, Dec 11, 2013 at 10:43 PM, Shane Carey careys...@gmail.com wrote: Hey, Thanks for this. I think I need some way of transposing the data onto

Re: [R] 3-D interpretation

2013-12-11 Thread Shane Carey
Hey, Nope, it crashes. R stops abruptly. I sent just 500 points to show the structure of the data. There is in fact over 22,000 points and it is 3-D data composing of x,y,z data Cheers On Wed, Dec 11, 2013 at 3:24 PM, Ben Bolker bbol...@gmail.com wrote: Shane Carey careyshan at gmail.com

Re: [R] 3-D interpretation

2013-12-11 Thread Shane Carey
= data.frame) On Wed, Dec 11, 2013 at 4:24 PM, Ben Bolker bbol...@gmail.com wrote: On 13-12-11 11:13 AM, Shane Carey wrote: Hey, Nope, it crashes. R stops abruptly. I sent just 500 points to show the structure of the data. There is in fact over 22,000 points and it is 3-D data composing of x,y,z

Re: [R] 3-D interpretation

2013-12-11 Thread Shane Carey
I want it as one block, if you know what I mean. Like the akima example. Thanks On Wed, Dec 11, 2013 at 4:41 PM, Shane Carey careys...@gmail.com wrote: Ok, here is the first 1500 points, but Im giving up hope on it to be honest. It seems to be going crazy, creating triangles everywhere. Do

Re: [R] 3-D interpretation

2013-12-11 Thread Shane Carey
, duplicate=mean) with(akima.si,rgl.surface(x,y,z,color=blue,alpha=c(0.5))) with(akima.si,image(x,y,z)) filled.contour(akima.si$x,akima.si$y,akima.si$z) On 13-12-11 11:44 AM, Shane Carey wrote: I want it as one block, if you know what I mean. Like the akima example. Thanks

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
Hi, I have since solved that problem, but now R keeps crashing. I have over 20,000 points. Can R handle that amount? Cheers On Tue, Dec 10, 2013 at 3:35 PM, Shane Carey careys...@gmail.com wrote: Hi, im trying to create a 3-D interpretation of a geological fault using the akima package

[R] 3-D interpretation

2013-12-10 Thread Shane Carey
Hi, im trying to create a 3-D interpretation of a geological fault using the akima package. But my code fails below highlighted in red: Does anyone have any ideas why this is. Thanks dat-read.delim(D:\\fault.txt,header=T,sep=,) library(rgl) # data rgl.spheres(dat$X,dat$Z , dat$Y,1,color=red)

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
$X), length = 100), yo=seq(min(dat$Y), max(dat$Y), length = 100), linear = FALSE, extrap = TRUE) On Tue, Dec 10, 2013 at 3:48 PM, Sarah Goslee sarah.gos...@gmail.comwrote: Hi, On Tue, Dec 10, 2013 at 10:42 AM, Shane Carey careys...@gmail.com wrote: Hi

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
- David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Shane Carey Sent: Tuesday, December 10, 2013 9:36 AM

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
error message? David From: Shane Carey [mailto:careys...@gmail.com] Sent: Tuesday, December 10, 2013 10:30 AM To: dcarl...@tamu.edu Cc: r-help@r-project.org Subject: Re: [R] 3-D interpretation Hey David, I set it equal to the mean. duplicate=mean but still no joy, Thanks On Tue

Re: [R] What is the easiest way to interpolate vertical values on a square section of a nearly-planar 3D surface

2013-12-03 Thread Shane Carey
I have a similar problem that I need to solve. I need to be able to visualise a Geological fault in 3-D. I need to interpolate the x y z data and then visualise it on its side. Im not sure if or is capable of doing this? Thanks On Tue, Dec 3, 2013 at 4:02 AM, Mercutio Florid

Re: [R] Counting numbers in R

2013-10-04 Thread Shane Carey
I got sorted, Thanks all On Fri, Oct 4, 2013 at 2:03 PM, S Ellison s.elli...@lgcgroup.com wrote: I have a set of data and I need to find out how many points are below a certain value but R will not calculate this properly for me. R will. But you aren't. Negative numbers seem to be

Re: [R] R not ploting lines in the correct order

2013-09-27 Thread Shane Carey
. Sarah On Thu, Sep 26, 2013 at 1:56 PM, Shane Carey careys...@gmail.com wrote: Hi, I have a set of x, y points where x represents dates and y actual values. I am trying to plot a line graph of the data with points on top, but R is connecting the wrong points with lines. Does anyone

Re: [R] R not ploting lines in the correct order

2013-09-27 Thread Shane Carey
if your Date column is a date format, or character, or factor, or who knows what, and that may matter for answering your question. Also, what are the wrong points? What points do you expect to be connected? Sarah On Fri, Sep 27, 2013 at 8:13 AM, Shane Carey careys...@gmail.com wrote: Hi

Re: [R] R not ploting lines in the correct order

2013-09-27 Thread Shane Carey
Your a starbar, exactly what Im looking for. Thanks a mill!! On Fri, Sep 27, 2013 at 3:26 PM, PIKAL Petr petr.pi...@precheza.cz wrote: OK -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Shane Carey Sent: Friday

[R] R not ploting lines in the correct order

2013-09-26 Thread Shane Carey
Hi, I have a set of x, y points where x represents dates and y actual values. I am trying to plot a line graph of the data with points on top, but R is connecting the wrong points with lines. Does anyone know how I can rectify this. Please see sample below: x= 24/09/2009 09:13 16/10/2009 11:17

Re: [R] scale breaks

2013-08-31 Thread Shane Carey
I want to use it, but just show a slash on the yaxis rather than two horizontal lines. Thanks On Saturday, August 31, 2013, Jim Lemon wrote: On 08/30/2013 11:53 PM, Shane Carey wrote: Hi Jim et al, I want to remove the upper bounding box, I did this by #box() in the gap.plot function

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
Thanks On Fri, Aug 30, 2013 at 1:49 AM, Jim Lemon j...@bitwrit.com.au wrote: On 08/30/2013 01:28 AM, Shane Carey wrote: Hello all, I have decided to go ahead with gap.boxplot. I am trying to suppress the axis labels, both x and y labels. I tried using axis.labels=NULL but it would

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
Hi, xlab=, ylab, Would not work. Thanks On Fri, Aug 30, 2013 at 9:37 AM, Shane Carey careys...@gmail.com wrote: Thanks On Fri, Aug 30, 2013 at 1:49 AM, Jim Lemon j...@bitwrit.com.au wrote: On 08/30/2013 01:28 AM, Shane Carey wrote: Hello all, I have decided to go ahead

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
=) My aim is to not show the labels at the tick marks as I will add them to the plot afterwards On Fri, Aug 30, 2013 at 10:55 AM, Berend Hasselman b...@xs4all.nl wrote: On 30-08-2013, at 11:49, Shane Carey careys...@gmail.com wrote: Hi, xlab=, ylab, You were told to use xlab=, ylab

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
Oooff, Right, I will give it a go and see how I get on. Thanks On Fri, Aug 30, 2013 at 11:17 AM, Jim Lemon j...@bitwrit.com.au wrote: On 08/30/2013 07:57 PM, Shane Carey wrote: This is what I put in: gap.boxplot(DATA$Conductivity~**factor(DATA$UnitName_1),ylim=** c(LOWER_Y_Conductivity

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
It worked perfectly, your a star!!! Thanks On Fri, Aug 30, 2013 at 11:40 AM, Shane Carey careys...@gmail.com wrote: Oooff, Right, I will give it a go and see how I get on. Thanks On Fri, Aug 30, 2013 at 11:17 AM, Jim Lemon j...@bitwrit.com.au wrote: On 08/30/2013 07:57 PM, Shane Carey

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
, 2013 at 11:44 AM, Shane Carey careys...@gmail.com wrote: It worked perfectly, your a star!!! Thanks On Fri, Aug 30, 2013 at 11:40 AM, Shane Carey careys...@gmail.com wrote: Oooff, Right, I will give it a go and see how I get on. Thanks On Fri, Aug 30, 2013 at 11:17 AM, Jim Lemon j

Re: [R] scale breaks

2013-08-29 Thread Shane Carey
with this package. Is it possible to remove the upper and lower boxes horizontal lines and replace the gap symbol with axis.break on the y-axis instead. Any advice would be greatly appreciated!!! Thanks On Thu, Aug 29, 2013 at 9:38 AM, Shane Carey careys...@gmail.com wrote: Ok, thanks all

Re: [R] scale breaks

2013-08-29 Thread Shane Carey
I would also like to display a y-axis value in the upper box I got this part working now. On Thu, Aug 29, 2013 at 4:28 PM, Shane Carey careys...@gmail.com wrote: Hello all, I have decided to go ahead with gap.boxplot. I am trying to suppress the axis labels, both x and y labels. I tried

[R] break on yaxis of boxplot

2013-08-28 Thread Shane Carey
Hi, I am trying to create a break on the y-axis of a boxplot using axis.break. My data range from 4 to 12 with a break at 11. I have tried the following code: A-c(4,5,6,7,8,9,10,12) B-c(4,5,6,7,8,9,10,12) axis(2,A,B) Where A and B are the tick marks and labels respectively? However the plot

Re: [R] break on yaxis of boxplot

2013-08-28 Thread Shane Carey
Sorry, I found what I was doing wrong!! Thanks On Wed, Aug 28, 2013 at 5:09 PM, Shane Carey careys...@gmail.com wrote: Hi, I am trying to create a break on the y-axis of a boxplot using axis.break. My data range from 4 to 12 with a break at 11. I have tried the following code: A-c

[R] scale breaks

2013-08-28 Thread Shane Carey
Hi, Has anyone ever created scale breaks in R something like what is shown here in the section, Use a Scale Break http://www.r-bloggers.com/graphing-highly-skewed-data/ Thanks -- Shane [[alternative HTML version deleted]] __

[R] Labelling

2013-07-09 Thread Shane Carey
Hi, I have the following data as labels: DATA_names-c(A_ugkg_FA,S_mgkg_XRF ,Cl_mgkg_XR) and I need to convert to -1 A (ug kg ) -1 S (mg kg) -1 Cl (mg kg) I used the following piece of code to convert the following labels in the past, but

[R] Labelling- I figured it out

2013-07-09 Thread Shane Carey
Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] Labelling

2013-07-09 Thread Shane Carey
. - Original Message - From: Shane Carey careys...@gmail.com To: r-help@r-project.org r-help@r-project.org Cc: Sent: Tuesday, July 9, 2013 7:20 AM Subject: [R] Labelling Hi, I have the following data as labels: DATA_names-c(A_ugkg_FA,S_mgkg_XRF ,Cl_mgkg_XR) and I need to convert

Re: [R] Labelling

2013-07-09 Thread Shane Carey
}) ~ XR A.K. From: Shane Carey careys...@gmail.com To: arun smartpink...@yahoo.com Cc: R help r-help@r-project.org Sent: Tuesday, July 9, 2013 8:57 AM Subject: Re: [R] Labelling Initially, I wanted to remove the suffixes, but now I want to end up

[R] Combining levels

2013-06-27 Thread Shane Carey
Hi, I am trying to combine two levels and leave all other levels unchnaged. I have tried doing the following: combine_factor(DATA$Land_zone, c(mix use,Mixed use)) but it just returns NA. Thanks -- Shane [[alternative HTML version deleted]]

[R] XYZ data

2013-06-26 Thread Shane Carey
I have x, y, z data. The x, y fields dont change but Z does. How do I add a very small number onto the end of each x, y data point. For example: Original (X) Original (Y) Original (Z) 15 20 30 15

Re: [R] XYZ data

2013-06-26 Thread Shane Carey
Nope, neither work. :-( On Wed, Jun 26, 2013 at 5:16 PM, Clint Bowman cl...@ecy.wa.gov wrote: John, That still leaves a string of identical numbers in the vector. Shane, ?jitter perhaps jitter(X,1,0.0001) Clint Clint BowmanINTERNET: cl...@ecy.wa.gov Air

[R] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
Hi, I am trying to calculate the geometric mean with tapply. This is the formula I am using: exp(tapply(log(data$value), data$group, mean)) However, it returns the arithmetic mean. Any ideas? Thanks -- Shane [[alternative HTML version deleted]]

Re: [R] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
= FALSE){ if(na.rm) x - x[!is.na(x)] n - length(x) prod(x)^(1/n) } tapply(data$value, data$group, gmean) Hope this helps, Rui Barradas Em 25-06-2013 11:58, Shane Carey escreveu: Hi, I am trying to calculate the geometric mean with tapply

Re: [R] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
Of Shane Carey Sent: Tuesday, June 25, 2013 1:25 PM To: Rui Barradas Cc: r-help@r-project.org Subject: Re: [R] Calculate geometric mean with tapply Thanks for your help, put I've tried that and it still gives me back the mean when I use it within tapply for some reason can we believe

[R] creat raster from XYZ

2013-06-25 Thread Shane Carey
Hi, I have a data set consisting of XYZ data. the dimensions are 22427 rows by 3 columns. I try to use rasterFromXYZ from the raster package but I get the following error: Error in rasterFromXYZ(DATA) : x cell sizes are not regular Any help would be appreciated. Thanks -- Shane

Re: [R] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
To: Shane Carey careys...@gmail.com Cc: r-help@r-project.org r-help@r-project.org Sent: Tuesday, June 25, 2013 8:50 AM Subject: Re: [R] Calculate geometric mean with tapply Hm -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf

[R] Fault geology xyz to raster

2013-06-23 Thread Shane Carey
Hi, I have a 3-d geology problem. I have an xyz fault data set. I am able to view the data set in R using plot3-d but cannot create a raster from it. I need to create a raster and export so that it can be read in arcscene. Can anybody help? Thanks -- Shane [[alternative HTML version

Re: [R] Fault geology xyz to raster

2013-06-23 Thread Shane Carey
be viewed in a 3-d program like Arcscene. On Sunday, June 23, 2013, David Winsemius wrote: On Jun 23, 2013, at 1:50 PM, Shane Carey wrote: Hi, I have a 3-d geology problem. I have an xyz fault data set. I am able to view the data set in R using plot3-d That cannot be a function name

[R] Force boxplot y-axis to zero

2013-06-13 Thread Shane Carey
Hi, I have a Tukey boxplot y-axis starting at 2.5, how do I force it's y-axis to start a t zero Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Force boxplot y-axis to zero

2013-06-13 Thread Shane Carey
Thanks that done the trick. Cheers On Thu, Jun 13, 2013 at 10:59 AM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, Something like this? x - runif(100, min = 2, max = 10) boxplot(x, ylim = c(0, max(x))) Hope this helps, Rui Barradas Em 13-06-2013 10:02, Shane Carey escreveu

[R] Remove levels

2013-06-13 Thread Shane Carey
I have a dataframe consisting of factors in one column. Im trying to remove certain levels using the following code: toBeRemoved1-which(DATA$UnitName_1==lake) DATA-DATA[-toBeRemoved1,] However it will not remove the level lake In the past this worked for me, but its not working now. Any help

Re: [R] Remove levels

2013-06-13 Thread Shane Carey
Nope, but thanks On Thu, Jun 13, 2013 at 1:11 PM, Albin Blaschka albin.blasc...@standortsanalyse.net wrote: Am 13.06.2013 14:02, schrieb Shane Carey: I have a dataframe consisting of factors in one column. Im trying to remove certain levels using the following code: toBeRemoved1-which

[R] increase outlier size on boxplot

2013-06-07 Thread Shane Carey
Hi, Does anybody know how to increase boxplot outlier symbol size? And also the line from min/max to outlier Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] increase outlier size on boxplot

2013-06-07 Thread Shane Carey
Great, thanks Sarah On Fri, Jun 7, 2013 at 3:46 PM, Sarah Goslee sarah.gos...@gmail.com wrote: Hi Shane, On Fri, Jun 7, 2013 at 10:36 AM, Shane Carey careys...@gmail.com wrote: Hi, Does anybody know how to increase boxplot outlier symbol size? And also the line from min/max

[R] Horizontal labels on a plot

2013-06-07 Thread Shane Carey
Hi, I have a plot with horizontal lables on the x-axis. For example: Devonian volcanic rocks n=2 with n=2 on a new line. How do I centre n=2 under the Devonian volcanic rocks label? This was my code: text(axis_text, par(usr)[three], labels = paste(LABELS, \n , n =, t(t(name.count[,two]))),

[R] Modelling categorical and non-categorical datasets using Artifical Neural Networks

2013-05-29 Thread Shane Carey
Hi, I have to do some Radon modelling and I have categorical and non categorical datasets. I have been considering Artificial Neural Networks to do this. I was wondering has anybody done anything like this before and have you any advice before I start and where there might be some good tutorials

[R] sample size in box plot labels

2013-04-26 Thread Shane Carey
Hi, I would like to put the sample number beside each lable in a boxplot. How do I do this? Essentially, I need to count the sample size for each factor, see below: Thanks boxplot(DATA$K_Merge~factor(DATA$UnitName_1),axes=FALSE,col=colours) title(main=list(Tukey Boxplot by Geology:\n

Re: [R] sample size in box plot labels

2013-04-26 Thread Shane Carey
This works, great. Cheers On Fri, Apr 26, 2013 at 12:02 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, To count the sample sizes for each factor try tapply(DATA$K_Merge, DATA$UnitName_1, FUN = length) Hope this helps, Rui Barradas Em 26-04-2013 10:48, Shane Carey escreveu

[R] labeling

2013-04-26 Thread Shane Carey
Hi, I have a dataset as follows: Name N Visean limestone calcareous shale 2 Visean sandstone, mudstone evaporite 2 Westphalian shale, sandstone, siltstone coal How do I combine them so that I can label a plot with Visean limestone calcareous shale

Re: [R] the joy of spreadsheets (off-topic)

2013-04-17 Thread Shane Carey
Can you resend this link please? Thanks On Tue, Apr 16, 2013 at 10:33 PM, Jim Lemon j...@bitwrit.com.au wrote: On 04/17/2013 03:25 AM, Sarah Goslee wrote: ... Ouch. (Note: I know nothing about the site, the author of the article, or the study in question. I was pointed to it by someone

[R] %*%

2013-04-11 Thread Shane Carey
What does these operators do: %*% Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] %*%

2013-04-11 Thread Shane Carey
Thank you both On Thu, Apr 11, 2013 at 11:46 AM, Berend Hasselman b...@xs4all.nl wrote: On 11-04-2013, at 12:25, Shane Carey careys...@gmail.com wrote: What does these operators do: %*% Please read a manual. And at least try some searching in R: ?%*% Introduction to R ( http

[R] log x-axis lables on a histogram

2013-04-10 Thread Shane Carey
Hi, If you have the following lets say: hist(log10(rnorm(0:1000))) How do you show the labels on the x-axis as log vaules? so lets say: 0.01, 0.1,0,1,10,100 and so on. Thanks -- Shane [[alternative HTML version deleted]] __

Re: [R] log x-axis lables on a histogram

2013-04-10 Thread Shane Carey
Yup, that worked. Thats great. Thanks On Wed, Apr 10, 2013 at 3:34 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, Try h - hist(log10(rnorm(0:1000)), xaxt = n) axis(1, at = pretty(h$breaks), labels = 10^pretty(h$breaks)) Hope this helps, Rui Barradas Em 10-04-2013 14:25, Shane

Re: [R] Superscript

2013-04-05 Thread Shane Carey
I have not had the chance to implement this yet, but thanks to you both for your help. This r-help should be complimented on how helpful it is. Its really topnotch. Thanks On Thu, Apr 4, 2013 at 11:11 PM, Paul Johnson pauljoh...@gmail.com wrote: On Thu, Apr 4, 2013 at 4:39 AM, Shane Carey

Re: [R] Superscript

2013-04-04 Thread Shane Carey
- data.frame(Na_mgkg=1:10, K_ugkg=10:1) plot(Na_mgkg ~ K_ugkg, data=d, xlab=f(K_ugkg), ylab=f(Na_mgkg)) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Shane Carey Sent

Re: [R] Superscript

2013-04-04 Thread Shane Carey
[mailto:r-help-boun...@r-project.org] On Behalf Of Shane Carey Sent: Wednesday, April 03, 2013 8:02 AM To: r-help@r-project.org Subject: [R] Superscript Hi, How do I write a superscript within gsub? I have the following: gsub(_mgkg,expression(paste(mg kg^{-1})),names[1]) Thanks

[R] place x-axis labels at bin edges in a histogram

2013-04-04 Thread Shane Carey
Hi, I would like to places x-axis labels at the edge of bins on a histogram, i.e. the min value at first bin edge (left hand side) and max at the last bin edge (right hand side). As it stands, it places the values in the centre of each bin. Thanks -- Shane [[alternative HTML version

Re: [R] place x-axis labels at bin edges in a histogram

2013-04-04 Thread Shane Carey
Yup, that did the trick. Thanks a mil On Thu, Apr 4, 2013 at 12:10 PM, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, Try the following. h - hist(rnorm(100), xaxt = n) axis(1, at = h$breaks) Hope this helps, Rui Barradas Em 04-04-2013 11:44, Shane Carey escreveu: Hi, I

  1   2   >