Re: [R] Labelling a fortified GADM map plotted with ggplot and geom_map

2018-03-19 Thread Bert Gunter
The r-sig-geo list, https://stat.ethz.ch/mailman/listinfo/r-sig-geo is often a better place to post such geographically related queries. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breat

Re: [R] Labelling interaction axes of a nomogram using rms

2016-08-27 Thread Leonardo Guizzetti
Hi David, As suggested, here is some example code adapted from the example of the nomogram() from the rms package. You'll notice that variable labels are not being applied to main effects or interaction terms. Leonardo rm(list = ls()) # Import libraries require(Hmisc) require(rms) set.seed(123

Re: [R] Labelling interaction axes of a nomogram using rms

2016-08-26 Thread David Winsemius
> On Aug 26, 2016, at 11:53 AM, Leonardo Guizzetti > wrote: > > Good afternoon, > > I have tried searching and have hit a wall with my own trial and error. I > have been able to use "nice" labels for non-interacted variables by setting > them using Newlabels(), but I am unable to do so for the

Re: [R] labelling a plot in binom library function call

2014-04-01 Thread Pascal Oettli
Hello, The "binom" package is using "ggplot2" to plot the density. Thus, you have to follow the "ggplot2" syntax: R> binom.bayes.densityplot(hpdc) + ggtitle("my plot") HTH Pascal On Tue, Apr 1, 2014 at 7:41 AM, Chris wrote: > Hi, I'm using a function in the binom library. I'd like to add a t

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 arun
___ From: Shane Carey To: arun Cc: R help 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 with the following  c("A_ugkg_FA","S_mgkg_XRF" ,"Cl_mgkg_XR&quo

Re: [R] Labelling

2013-07-09 Thread Shane Carey
Initially, I wanted to remove the suffixes, but now I want to end up with the following c("A_ugkg_FA","S_mgkg_XRF" ,"Cl_mgkg_XR") -1 A (ug kg) FA -1 S (mg kg ) XRF -1 Cl (mg kg ) XR Thanks all On Tue, Jul 9, 2013 at 1:48 PM, arun wrote: > Hi,

Re: [R] Labelling

2013-07-09 Thread arun
Hi, May be this helps:  gsub("_"," ",gsub("(.*)_.*","\\1",DATA_names)) #[1] "A ugkg"  "S mgkg"  "Cl mgkg" sapply(gsub("_"," ",gsub("(.*)_.*","\\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

Re: [R] Labelling

2013-07-09 Thread Adams, Jean
Are you saying that you want to ignore the additional suffixes, _FA, _XRF, and _XR? If so, you can do so like this, sapply(strsplit(DATA_names, "_"), function(x) paste(x[1:2], collapse="_")) If not, what do you want to happen with those suffixes? Jean On Tue, Jul 9, 2013 at 6:20 AM, Shan

Re: [R] Labelling x axis in plot function

2012-12-04 Thread Jim Lemon
On 12/05/2012 04:24 AM, T Bal wrote: Hi, In the plot function I want to label x axis as the numbers between 1 and 12 (so 1, 2, 3, 4, 5, ..., 12). How should I do it? The range of x values are different than this range. Thanks! Hi T Bal, You are probably troubled by missing labels. Try the staxl

Re: [R] Labelling x axis in plot function

2012-12-04 Thread Rui Barradas
Hello, You should provide sample data and code. plot(3:10, xlim = c(0, 12), xaxt = "n") axis(1, at = 1:12) See the help page ?par for a description of the graphical parameters 'xlim' and 'xaxt', and of ?axis. Hope this helps, Rui Barradas Em 04-12-2012 17:24, T Bal escreveu: Hi, In the pl

Re: [R] Labelling individual points on 3D PCA scatterplot

2012-10-21 Thread Wang Ran
Hello,I am a Chinese student, and I got the same problem. I have learnd R for several weeks, I want to draw a PCA picture. I have data in excel format like this: ID d1 d2 d3 d4 A 1234 B 1234 C 1234 D 1234 E 1234 How to load these dat

Re: [R] Labelling R plots using Greek letters

2011-12-11 Thread Yihui Xie
A short answer is you can consider the tikzDevice package; then a long (really really long) answer is this: http://yihui.github.com/knitr/demo/graphics/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames,

Re: [R] Labelling R plots using Greek letters

2011-12-11 Thread David Winsemius
On Dec 11, 2011, at 6:38 PM, john james wrote: Dear R Users, Please I have the following query. I want to label one of the axes of my graph with the follwing latex expression- \beta^{\prime}x, i.e I have the transpose of beta. How do I go abt this. My second query is similar but it has

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-19 Thread Frank Harrell
Sorry about the nabble problem. At any rate, do require(Hmisc) then ?label to see how to associate a vector of labels with all the variables in a data frame at once. Frank do999 wrote: > > Indeed, as David pointed out, all the portion that used courier font (all > the good stuff) was absent from

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-19 Thread Monsieur Do
Indeed, as David pointed out, all the portion that used courier font (all the good stuff) was absent from the email posting.  Thanks for your answers. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-17 Thread array chip
Hi Frank, it's true to one of your reply to my previous post, can only be seen in Nabble. - Original Message - From: David Winsemius To: Frank Harrell Cc: r-help@r-project.org Sent: Wednesday, August 17, 2011 3:08 PM Subject: Re: [R] Labelling all variables at once (using Hmisc

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-17 Thread David Winsemius
in 1:length(x)) label(x[,i]) <- labels[i] if(length(labels) != length(x)) cat("Warning: data and labels are not of same length\n") return(x) } Thanks Message: 11 Date: Tue, 16 Aug 2011 04:22:07 -0700 (PDT) From: Frank Harrell <f.harr...@vanderbilt.edu> To: r-help@r-projec

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-17 Thread Frank Harrell
quot;Warning: data and labels are not of > same length\n") > return(x) > } > > Thanks > >> Message: 11 >> Date: Tue, 16 Aug 2011 04:22:07 -0700 (PDT) >> From: > Frank Harrell <f.harr...@vanderbilt.edu> >> To: > r-help@r-project.org >

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-17 Thread Monsieur Do
0 (PDT) > From: Frank Harrell > To: r-help@r-project.org > Subject: Re: [R] Labelling all variables at once (using Hmisc label) > Message-ID: <1313493727519-3746928.p...@n4.nabble.com> > Content-Type: text/plain; charset=UTF-8 >  > Do require(Hmisc); ?label to see the help fil

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-16 Thread Frank Harrell
Do require(Hmisc); ?label to see the help file for label. It will show you how to do this: Monsieur Do wrote: > > The labels can contain much more than just names. In my case, they are > variable descriptions (items from a questionnaire). I need to keep the > names as they are, hence the need f

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-15 Thread Monsieur Do
The labels can contain much more than just names. In my case, they are variable descriptions (items from a questionnaire). I need to keep the names as they are, hence the need for Hmisc's labels. On Mon, Aug 15, 2011 at 3:53 PM, Monsieur Do wrote: > I have a dataset and a list of labels. I simp

Re: [R] Labelling all variables at once (using Hmisc label)

2011-08-15 Thread Sarah Goslee
On Mon, Aug 15, 2011 at 3:53 PM, Monsieur Do wrote: > I have a dataset and a list of labels. I simply want to apply the labels to > the variables, all at once. The only way I was able to do it was using a loop: > > for (i in 1:length(data)) label(data[,i]) <- data.labels[i] > > I'd like to f

Re: [R] labelling a stacked barchart (lattice)

2011-08-04 Thread Weidong Gu
Marc, Try this one barchart(data=dta, ~x, group=y, stack=T,col=sort(brewer.pal(7,"Purples")), xlab="Percent", box.width=.5, scales=list(tick.number=10), panel=function(x,y,...){ panel.barchart(x,y,...) panel.text(cumsum(x)-dta$x/2,y,labels=dta$x) panel.text(cumsum(x)-dta$x/2,1.3,labels=as.charact

Re: [R] Labelling individual points on 3D PCA scatterplot

2009-10-29 Thread trz
Thank you Duncan! That is very helpful, after posting this i did figure out how to convert the 2d coordinates into 3d. I was initially hesitant about using rgl because i thought it looked messy. With the modifications you suggested for the plot, it actually looks very clear now in rgl! And it rota

Re: [R] Labelling individual points on 3D PCA scatterplot

2009-10-28 Thread Duncan Murdoch
On 10/28/2009 11:21 AM, trz wrote: Hi There, I'm attempting to plot 10 values on a three-dimensional PCA with text labels next to each point. While i have no trouble doing this on 2D plots using the 'text' or 'textxy' function, I cannot find a function to do this on a 3D plot. I am using princom

Re: [R] labelling points plotted in a 2D plan

2009-07-27 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.07.2009 23:15:04: > Thanks for the answer Tal! > But I can't get it to work correctly! :( > Please bear with me this is the first time I am using R! and I am in a rush > to correct a paper > in fact on the plane I am plotting a table > > fullpointed=

Re: [R] labelling points plotted in a 2D plan

2009-07-26 Thread Khaled OUANES
Hello Tal! Nothing showed up when I used those commands! The plot still shows dots with no labels! Thanks On Sun, Jul 26, 2009 at 7:28 AM, Tal Galili wrote: > Hi Khaled, > Did my answer help ? > > > > > On Sun, Jul 26, 2009 at 12:15 AM, Khaled OUANES wrote: > >> Thanks for the answer Tal! >>

Re: [R] labelling points plotted in a 2D plan

2009-07-25 Thread Khaled OUANES
Thanks for the answer Tal! But I can't get it to work correctly! :( Please bear with me this is the first time I am using R! and I am in a rush to correct a paper in fact on the plane I am plotting a table > fullpointed=read.table("fullpoints_backup.txt",h=F) > plot(range(-2.5,0.95),range(0.00,1.0

Re: [R] labelling points plotted in a 2D plan

2009-07-25 Thread Khaled OUANES
hey thanks for the answer but I couldn't achieve it? would you explain a bit more? I have like 300 points to label! thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] labelling points plotted in a 2D plan

2009-07-25 Thread Tal Galili
Sure, Here is an example: # get some random data to play with x <- runif(100) y <- runif(100) labels.to.plot <- sample(c("A","B"), 100, replace = T) # set up the window, play them one by one to see what they do plot.window(ylim = c(0,1), xlim = c(0,1)) plot.new() axis(1) axis(2) box() # plot th

Re: [R] labelling points plotted in a 2D plan

2009-07-25 Thread Tal Galili
Hi Khaled. I believe using "text" on an empty plot would do the trick... Tal On Sat, Jul 25, 2009 at 3:13 PM, Khaled OUANES wrote: > I created a 2 D plan: > > > plot(range(-2.5,0.95),range(0.00,1.00),type="n",axes=TRUE) > > I made a projection of points with their coordonates (X,Y) in that

Re: [R] Labelling curves on graphs

2008-07-17 Thread Ted Harding
On 17-Jul-08 02:32:41, Frank E Harrell Jr wrote: > Barry Rowlingson wrote: >> 2008/7/16 Ted Harding <[EMAIL PROTECTED]>: >> >>> Hi Folks, >>> I'd be grateful for good suggestions about the following. >>> >>> I'm plotting a family of (X,Y) curves (for different levels >>> of another variable, Z): s

Re: [R] Labelling curves on graphs

2008-07-17 Thread Frank E Harrell Jr
Barry Rowlingson wrote: Why use color when you can use black and label the curves where they are most separated? This solves problems with color blindness, xeroxing, and faxing. Where should I put the labels in this example: > set.seed(123) > z=matrix(runif(6*50),50,6) > matplo

Re: [R] Labelling curves on graphs

2008-07-17 Thread Barry Rowlingson
> Why use color when you can use black and label the curves where they are > most separated? This solves problems with color blindness, xeroxing, and > faxing. > Where should I put the labels in this example: > set.seed(123) > z=matrix(runif(6*50),50,6) > matplot(z,type='l',col=1,lty=1) A lab

Re: [R] Labelling curves on graphs

2008-07-16 Thread Frank E Harrell Jr
Barry Rowlingson wrote: 2008/7/16 Ted Harding <[EMAIL PROTECTED]>: Hi Folks, I'd be grateful for good suggestions about the following. I'm plotting a family of (X,Y) curves (for different levels of another variable, Z): say 6 curves in all but could be more or less -- it's a rather variables s

Re: [R] Labelling curves on graphs

2008-07-16 Thread Barry Rowlingson
2008/7/16 Ted Harding <[EMAIL PROTECTED]>: > Hi Folks, > I'd be grateful for good suggestions about the following. > > I'm plotting a family of (X,Y) curves (for different levels > of another variable, Z): say 6 curves in all but could be > more or less -- it's a rather variables situation. > > I'

Re: [R] Labelling curves on graphs

2008-07-16 Thread Ted Harding
Many thanks, Matt. for pointing that out. It certainly looks very promising -- but also there is an awful lot to study! [Pause, while I head for the coffee-maker] Ted. On 16-Jul-08 20:31:44, Austin, Matt wrote: > Dr. Harrell's Hmisc package has labcurve. > > --Matt > > -Original Message

Re: [R] Labelling curves on graphs

2008-07-16 Thread Austin, Matt
Dr. Harrell's Hmisc package has labcurve. --Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Harding Sent: Wednesday, July 16, 2008 1:17 PM To: [EMAIL PROTECTED] Subject: [R] Labelling curves on graphs Hi Folks, I'd be grateful for good suggestio

Re: [R] Labelling a secondary axis in R

2008-04-22 Thread Nakamura
-9699 > eFax: 614-455-3265 > http://www.StatisticalEngineering.com > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On > Behalf Of [EMAIL PROTECTED] > Sent: Monday, April 21, 2008 10:23 AM > To: Duncan Murdoch > Cc: r-help@r-project.org > Subject:

Re: [R] Labelling a secondary axis in R

2008-04-21 Thread Charles Annis, P.E.
, 2008 10:23 AM To: Duncan Murdoch Cc: r-help@r-project.org Subject: Re: [R] Labelling a secondary axis in R Apologies for the private mail, Nabble has not yet updated the thread so I can write another post in it. I think I have confused things. I don't mean the labels are incorrect. They are

Re: [R] Labelling a secondary axis in R

2008-04-21 Thread rbt501
Apologies for the private mail, Nabble has not yet updated the thread so I can write another post in it. I think I have confused things. I don't mean the labels are incorrect. They are fine. What I am referring to is a title for the secondary axis, which is currently entitled as "c(-100,200)".

Re: [R] Labelling a secondary axis in R

2008-04-21 Thread Duncan Murdoch
On 4/21/2008 9:02 AM, Nakamura wrote: > Hello, > > How can I label a secondary axis in R? At the moment it's labelled as > c(-100,200). Obviously I would like it to be more sensible. > > Here is the code I am using > > newx = -100+37.5*((1:9)-1) > axis(4,at=newx,labels=(newx+100)/3750) I don't