[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
Super, thanks Boris. Top notch :-) On Mon, Sep 25, 2017 at 1:05 PM, Boris Steipe wrote: > Always via logical expressions. In this case you can use the logical > expression > > myDF$b != "0" > > to give you a vector of TRUE/FALSE > > > > B. > >

Re: [R] Subset

2017-09-25 Thread Shane Carey
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 wrote: > > > > Hi, > > > > Lets say this was a dataframe where I

Re: [R] Subset

2017-09-25 Thread Shane Carey
ng that? Thanks in advance On Fri, Sep 22, 2017 at 5:04 PM, Shane Carey wrote: > Super, > > Thanks > > On Fri, Sep 22, 2017 at 4:57 PM, Boris Steipe > wrote: > >> > a <- c("<0.1", NA, 0.3, 5, "Nil") >> > a >> [1] "<

Re: [R] Subset

2017-09-22 Thread Shane Carey
age: > 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 wrote: > > > > Hi, > > > > How do I extract just numbers from the followin

[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
ty" comic strip ) > > > On Tue, Feb 14, 2017 at 3:33 AM, Ulrik Stervbo > wrote: > > Hi Shane, > > > > Wrong forum. This might be what you are looking for > > > > ffmpeg -i %03d.png output.gif > > > > Or use the library gganimate. > >

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

2017-02-14 Thread Shane Carey
re looking for > > ffmpeg -i %03d.png output.gif > > Or use the library gganimate. > > Best > Ulrik > > Shane Carey schrieb am Di., 14. Feb. 2017, 12:08: > >> Hi, >> >> I have many png files that I would like to stitch together, in order to >>

[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 UN

Re: [R] Ocr

2016-07-26 Thread Shane Carey
tps://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 > wrote: > > On Wed, 27 Jul 2016, Shane Carey

Re: [R] Ocr

2016-07-26 Thread Shane Carey
t. > > http://www.paperfile.net/ > > Jim > > > On Wed, Jul 27, 2016 at 6:11 AM, Shane Carey > wrote: > > Hi, > > > > Has anyone ever done any ocr in R?? I have some scanned images that I > would > > like to convert to text!! > > Thanks > > >

[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 more,

[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 UNSU

Re: [R] Kendall heat map

2016-06-17 Thread Shane Carey
to be all you need. > > On Fri, Jun 17, 2016 at 5:47 AM, Shane Carey wrote: > > 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

[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) ggplot(

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

2016-03-01 Thread Shane Carey
ween 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 > >( > https://stat

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 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 it vertically, horizontally, or at

[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 https://st

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 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] 3037 41> dim(DATA_NFGWS)[1] 2

[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 colum

[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 colum

[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 https://stat.ethz.ch/ma

[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 mailin

Re: [R] Boxplot colors

2014-05-22 Thread Shane Carey
king up some data > pH <- data.frame(matrix(rnorm(200), 10, 20)) > > bwplot(value ~ variable, data=melt(pH), col=unlist(colors_list), >panel=panel.bwplot.superpose, groups=variable) > > boxplot(value ~ variable, data=melt(pH), col=unlist(colors_list)) > > ## Rich &g

[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] 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 wrote: > On Tue, 20 May 2014 02:39:17 PM Shane Carey wrote: > > Hi, > > > > I amtrying to plot a cfd with a histogram on

[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: http://ej.iop.org/images/0952-4746/32/3/325/Full/jrp428239f9_onli

Re: [R] Boxplots

2014-05-20 Thread Shane Carey
oxplots.) > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > > On Mon, May 19, 2014 at 2:41 PM, Shane Carey wrote: > > Great, > > > > Thanks everyone :-) > > > > On Monday, May 19, 2014, Richard M. Heiberger wrote: > > > >> tm

Re: [R] Boxplots

2014-05-19 Thread Shane Carey
) ## if necessary > library(HH) > demo("bwplot.examples", package="HH") > example("panel.bwplot.superpose", package="HH") > ?panel.bwplot.intermediate.hh > ?panel.bwplot.superpose > > On Mon, May 19, 2014 at 10:08 AM, Shane Carey > > > wrote: &g

[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 https:/

[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 <- lim

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 wrote: > Hey Frede, > > I found the answer, > > thanks for your help. > > Shane > > > On Fri, Apr 25, 2014 at 12:42

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 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 > be the same?

Re: [R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
+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 e

Re: [R] Linear line on pairs plot

2014-04-25 Thread Shane Carey
D. > Plant Performance & Modeling > > Technology & Service Solutions > 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. > Ple

[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"); on.e

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 wrote: > Hey, > > Thanks for this. I think I need some way of transposing the data onto a > hori

Re: [R] 3-D interpretation

2013-12-11 Thread Shane Carey
ce(x,y,z,color="green",alpha=c(0.5))) > > > # bivariate cubic spline interpolation > # interp: > akima.si <- interp(dat$X, dat$Y, dat$Z, >xo=seq(min(dat$X), max(dat$X), length = 100), >yo=seq(min(dat$Y), max(dat$Y), length

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 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 t

Re: [R] 3-D interpretation

2013-12-11 Thread Shane Carey
ow.names = c(NA, 1500L), class = "data.frame") On Wed, Dec 11, 2013 at 4:24 PM, Ben Bolker 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

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 wrote: > Shane Carey gmail.com> writes: > > &

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
g the same 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. du

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
hem. > > ?interp > > - > David L Carlson > Department of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behal

Re: [R] 3-D interpretation

2013-12-10 Thread Shane Carey
bic spline interpolation # interp: akima.si <- interp(dat$X, dat$Y, dat$Z, xo=seq(min(dat$X), max(dat$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

[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="re

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 wrote: > Hi, > > im trying to create a 3-D interpretation of a geological fault using > the akima package.

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 wrote: > I want to

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 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 causing the issue.

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 wrote: > OK > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > > project.org] On Behalf Of Shane Carey > > Se

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

2013-09-27 Thread Shane Carey
t; > You see, if I look at your object as you pasted it in, I can't tell 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 ex

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

2013-09-27 Thread Shane Carey
t you are. Please also provide > the code you're using to make the graph. > > Sarah > > On Thu, Sep 26, 2013 at 1:56 PM, Shane Carey wrote: > > Hi, > > > > I have a set of x, y points where x represents dates and y actual > values. I > > am trying to plot a

[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

[R] plotting time series

2013-09-10 Thread Shane Carey
Hi, I am trying to plot the following time series: Low sampling rate Low sampling rate Sample High sampling rate High sampling rate Sample 09:50:00 4.474203 09:50:37 4.465 10:00:00 4.493805 09:50:38 4.452 10:10:00 4.503606 09:50:39 4.451 10:20:00 4.513407 09:50:40 4.465 10:30:00 4.503606 09

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

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
, 2013 at 11:44 AM, Shane Carey wrote: > It worked perfectly, your a star!!! > > Thanks > > > On Fri, Aug 30, 2013 at 11:40 AM, Shane Carey wrote: > >> Oooff, Right, I will give it a go and see how I get on. >> >> Thanks >> >> >> On Fri, Au

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 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 wrote: > >> On 08/30/2013 07:57 PM, Shane Carey w

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 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(LOW

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
range=1.5,xlab="",ylab="") 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 wrote: > > On 30-08-2013, at 11:49, Shane Carey wrote: > > > Hi, > > > &

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 wrote: > Thanks > > > On Fri, Aug 30, 2013 at 1:49 AM, Jim Lemon wrote: > >> On 08/30/2013 01:28 AM, Shane Carey wrote: >> >>> Hello all, &

Re: [R] scale breaks

2013-08-30 Thread Shane Carey
Thanks On Fri, Aug 30, 2013 at 1:49 AM, Jim Lemon 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

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 wrote: > Hello all, > > I have decided to go ahead with gap.boxplot. I am trying to suppress the > axis labels, both x and y

Re: [R] scale breaks

2013-08-29 Thread Shane Carey
at possible to do so 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 wrote: > Ok, thanks al

Re: [R] scale breaks

2013-08-29 Thread Shane Carey
Ok, thanks all :-) On Thu, Aug 29, 2013 at 2:39 AM, Jim Lemon wrote: > On 08/29/2013 02:52 AM, Shane Carey wrote: > >> Hi, >> >> Has anyone ever created scale breaks in R something like what is shown >> here >> in the section, >> Use a Scale Break

[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-help@r-projec

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 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 follow

[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 w

Re: [R] Labelling

2013-07-09 Thread Shane Carey
t; A ~ (mu * g ~ kg^{ > -1 > }) ~ FA > > $S_mgkg_XRF > S ~ (mg ~ kg^{ > -1 > }) ~ XRF > > $Cl_mgkg_XR > Cl ~ (mg ~ kg^{ > -1 > }) ~ XR > > A.K. > > > > > > > > From: Shane Carey > To: a

Re: [R] Labelling

2013-07-09 Thread Shane Carey
ot;,"\\1",DATA_names)),f) > $`A ugkg` > A ~ (mu * g ~ kg^{ > -1 > }) > > $`S mgkg` > S ~ (mg ~ kg^{ > -1 > }) > > $`Cl mgkg` > Cl ~ (mg ~ kg^{ > -1 > }) > > > A.K. > > - Original Message - > From: Shane Carey >

[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, minimal,

[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 pas

[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]] ___

Re: [R] XYZ data

2013-06-26 Thread Shane Carey
Nope, neither work. :-( On Wed, Jun 26, 2013 at 5:16 PM, Clint Bowman 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 Qual

[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] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
I got it to work, sorry my fault, there was a problem with the data. Thanks On Tue, Jun 25, 2013 at 4:13 PM, arun wrote: > May be this also works: > > exp(mean(log(abs(x > #[1] 0.4985282 > A.K. > > > > - Original Message - > From: PIKAL Petr >

[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 [[a

Re: [R] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
Sorry, my fault. a problem with the data I was working with. Whoopsadaisey. Thanks all. Cheers On Tue, Jun 25, 2013 at 1:50 PM, PIKAL Petr wrote: > Hm > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > > project.or

Re: [R] Calculate geometric mean with tapply

2013-06-25 Thread Shane Carey
function(x, na.rm = 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: > > H

[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] Fault geology xyz to raster

2013-06-23 Thread Shane Carey
an 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 i

[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 d

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 >> certai

[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 hel

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 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

[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

[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[,t

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 wrote: > Hi Shane, > > On Fri, Jun 7, 2013 at 10:36 AM, Shane Carey wrote: > > Hi, > > > > Does anybody know how to increase boxplot outlier symbol size? And also > the > > line from min/max

[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 https://stat.ethz.ch/mailman/listinfo/r-he

[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 o

[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 sha

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 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

[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 K(%)",cex=c

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 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 else. Bu

Re: [R] %*%

2013-04-11 Thread Shane Carey
Thank you both On Thu, Apr 11, 2013 at 11:46 AM, Berend Hasselman wrote: > > On 11-04-2013, at 12:25, Shane Carey wrote: > > > What does these operators do: %*% > > > > Please read a manual. > And at least try some searching in R: ?"%*%" > > Intro

[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 http://www.R-project.org/posting-guide.h

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 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, >

[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]] __ R-help@r-projec

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 wrote: > > > > On Thu, Apr 4, 2013 at 4:39 AM, Shane Carey wr

Re: [R] Superscript

2013-04-04 Thread Shane Carey
A_mgkg","B_mgkg","C_mgkg","D_mgkg","E_mgkg","F_mgkg","G_mgkg","H > mgkg") > > lapply(DATA_names,function(x) if(grepl("_",x)) f(x) else x)[1:2] > #[[1]] > #A ~ (mg ~ kg^{ > #-1 > #}) > &g

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 wrote: > Hello, > > Try the following. > > > h <- hist(rnorm(100), xaxt = "n") > axis(1, at = h$breaks) > > > Hope this helps, > > Rui Barradas > > Em 0

  1   2   >