Re: [R] Font in JavaGD() pdf()

2007-03-17 Thread Prof Brian Ripley
what do you mean by 'send the figure to pdf'? My guess is that this is a Mac-specific question (e.g. you are using the R.app GUI), so please consider if this is the appropriate list. On Fri, 16 Mar 2007, Kubovy Michael wrote: Dear r-helpers, When I do an xYplot and display the result in a

[R] problem with mfg argument of par

2007-03-17 Thread Ken Knoblauch
I'm having a problem with the mfg option of par. Am I making an error in my usage? Here is a simple example that I thought would plot to the 4 corners of a 2x2 plot but doesn't plot to the lower right and plots twice on the upper left. par(mfrow = c(2, 2)) pos - as.matrix(expand.grid(1:2,

Re: [R] R and clinical studies

2007-03-17 Thread AJ Rossini
On Friday 16 March 2007 09:36, Delphine Fontaine wrote: Thanks for your answer which was very helpfull. I have another question: I have read in this document (http://cran.r-project.org/doc/manuals/R-intro.pdf) that most of the programs written in R are ephemeral and that new releases are not

Re: [R] scatterplot brushing

2007-03-17 Thread Michael Lawrence
Hi, just to clarify Hadley's points, GGobi is the new XGobi, but GGobi does NOT require an X server on Windows. On 3/17/07, hadley wickham [EMAIL PROTECTED] wrote: I should mention that it's very easy to install rggobi and ggobi on windows these days. GGobi has a nice installer,

Re: [R] problem with mfg argument of par

2007-03-17 Thread Prof Brian Ripley
The problem here is that setting par(mfg =) does an implicit par(new=TRUE) on the next plot (as otherwise it would advance to the next position). That is going to be confusing if there has been no plot, and that is what you are seeing: the first plot is done at c(1,1), overriding the setting

[R] legend with density and fill

2007-03-17 Thread Simon Pickett
Hi, I am trying to make a legend with four symbols as follows 1.white box 2.black box 3.clear box (same as background) 4.clear box with shading lines but the shading lines arent showing... here is my code. par(bg=lightyellow) barplot(c(seq(1,6,1))) legend(8.5,0.3, bty=o,

[R] Markov Decision Process Estimating in R (MDP)

2007-03-17 Thread sabine
Hello, does anyone know of an existing toolbox to estimate Markov Decision Processes in R? example in MATLAB: http://www.cs.ubc.ca/~murphyk/Software/MDP/mdp.html -zubin __ R-help@stat.math.ethz.ch mailing list

Re: [R] how to...

2007-03-17 Thread Tyler Smith
On 2007-03-16, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: for example: I have got these data, organized in a dataframe. sample1 sample2 sample3 sample4 group replicate11.000.020.350.50A replicate21.000.021.541.11A replicate31.00

[R] arrowhead styles

2007-03-17 Thread Hendrik Fuss
Hi all, I've been using the arrows() function in plots a lot, but I'm not happy with the appearance of the arrow heads. I understand that arrows () doesn't offer more sophisticated arrowhead shapes like e.g. a filled triangle, possibly with choice of angle at the point. Does anyone know an

Re: [R] Fast lookup in ragged array

2007-03-17 Thread Seth Falcon
Peter McMahan [EMAIL PROTECTED] writes: That's a good point. What's a good point? [this is why top-posting isn't so helpful]. What's the overhead on digests like that? Depends on the digest algorithm, the implementation, etc. To some extent, you can just try it and see. Or you can

[R] arrowhead styles

2007-03-17 Thread Mikkel Grum
One way would be to use the grid function arrow(). Paul Murrell's document on Integrating Grid Graphics Output with Base Graphics Output has an example of integrating grid graphics arrows in base graphics. There's also an Arrows() function in the package IDPMisc. Mikkel Hi all, I've been

[R] Correlated random effects in lme

2007-03-17 Thread Guillermo Villa
Hello, I am interested in estimating this type of random effects panel: y_it = x'_it * beta + u_it + e_it u_it = rho * u_it-1 + d_itrho belongs to (-1, 1) where: u and e are independently normally zero-mean distributed. d is also independently normally zero-mean distributed. So, I

Re: [R] legend with density and fill

2007-03-17 Thread Andrew Robinson
Hi Simon, Try fill=c(white,dark grey,black,black), density=c(NA,NA,25,75), etc Cheers Andrew On Sat, Mar 17, 2007 at 12:36:19PM +, Simon Pickett wrote: Hi, I am trying to make a legend with four symbols as follows 1.white box 2.black box 3.clear box (same as background)

Re: [R] Correlated random effects in lme

2007-03-17 Thread Adelchi Azzalini
On Sat, Mar 17, 2007 at 08:12:35PM +0100, Guillermo Villa wrote: Hello, I am interested in estimating this type of random effects panel: y_it = x'_it * beta + u_it + e_it u_it = rho * u_it-1 + d_itrho belongs to (-1, 1) where: u and e are independently normally zero-mean

Re: [R] arrowhead styles

2007-03-17 Thread Hendrik Fuss
Mikkel Grum: I've been using the arrows() function in plots a lot, but I'm not happy with the appearance of the arrow heads. I understand that arrows () doesn't offer more sophisticated arrowhead shapes like e.g. a filled triangle, possibly with choice of angle at the point. Does anyone

Re: [R] arrowhead styles

2007-03-17 Thread John Fox
Dear Hendrik, Arrows() is the first entry turned up by RSiteSearch(arrows, restrict=functions), so its effort to hide isn't very successful. Regards, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604

[R] Groups in XYPLOT

2007-03-17 Thread Thomas Colson
I'm not sure I'm barking up the right tree here, but would I need to make use of groups to plot two separate datasets within ONE panel in xyplot? The desired end result is a single xy plot of two separate (but similar in values and ranges). Full code follows, xyplot code at bottom

[R] What function in R is to estimate the marginal denstiy from bivarate samples?

2007-03-17 Thread junjun deng
I have 1 bivarate samples (x1, x2), and I want to estimate the marginal density of x2. I searched the R manual but couldn't find a function that can do this job. It seems density only works for single-variate samples. Can anybody help me with it? Thanks a lot! Best, J. Deng

Re: [R] What function in R is to estimate the marginal denstiy f

2007-03-17 Thread Ted Harding
On 17-Mar-07 22:14:54, junjun deng wrote: I have 1 bivarate samples (x1, x2), and I want to estimate the marginal density of x2. I searched the R manual but couldn't find a function that can do this job. It seems density only works for single-variate samples. Can anybody help me with it?

[R] italics letter in roman string

2007-03-17 Thread Chabot Denis
Hi, As part of the legend to a plot, I need to have the n in italics because it is a requirement of the journal I aim to publish in: This study, n = 3293 Presently I have: legend(20, 105, This study, n = 3293, pch=1, col=rgb(0,0,0,0.5), pt.cex=0.3, cex=0.8, bty=n) I suppose

[R] Flipping a vector

2007-03-17 Thread adschai
Hi all - A stupid question here, my apology. I would like to know how can I flip a vector in R? For example, I have a vector: a = c(1,2,3) I would like my vector b to have the following value b = c(1,2,3) But what operator I need to put to my original vector 'a' to obtain 'b'? Please let me

[R] Lag operator in R does not work

2007-03-17 Thread adschai
Hi - I'm quite wondering what makes the lag operator does not work for my time series. I have a time series of length about 20 elements. I would like to have a lag 1 of this time series. I did the following: logprice = log(price, base=exp(1)) # this is my log price which is a vector of

Re: [R] italics letter in roman string

2007-03-17 Thread Marc Schwartz
On Sat, 2007-03-17 at 22:01 -0400, Chabot Denis wrote: Hi, As part of the legend to a plot, I need to have the n in italics because it is a requirement of the journal I aim to publish in: This study, n = 3293 Presently I have: legend(20, 105, This study, n = 3293, pch=1,

Re: [R] Flipping a vector

2007-03-17 Thread Marc Schwartz
On Sun, 2007-03-18 at 02:52 +, [EMAIL PROTECTED] wrote: Hi all - A stupid question here, my apology. I would like to know how can I flip a vector in R? For example, I have a vector: a = c(1,2,3) I would like my vector b to have the following value b = c(1,2,3) I presume you meant:

Re: [R] Flipping a vector

2007-03-17 Thread Charilaos Skiadas
On Mar 17, 2007, at 10:52 PM, [EMAIL PROTECTED] wrote: Hi all - A stupid question here, my apology. I would like to know how can I flip a vector in R? For example, I have a vector: a = c(1,2,3) I would like my vector b to have the following value b = c(1,2,3) But what operator I need

Re: [R] Groups in XYPLOT

2007-03-17 Thread Andrew Robinson
Hi Thomas, sadly, the full code is not much help to us in the absence of the data. Can I suggest that you construct a reproducible worked example to help explain your question? For what it's worth I suspect that the answer is that you need to join these datasets into one and theneitehr use the

Re: [R] italics letter in roman string

2007-03-17 Thread jim holtman
It is easier with: legend('topleft', expression(paste(This study, , italic(n) == 3295))) On 3/17/07, Marc Schwartz [EMAIL PROTECTED] wrote: On Sat, 2007-03-17 at 22:01 -0400, Chabot Denis wrote: Hi, As part of the legend to a plot, I need to have the n in italics because it is a

Re: [R] italics letter in roman string

2007-03-17 Thread Marc Schwartz
On Sat, 2007-03-17 at 21:56 -0500, Marc Schwartz wrote: On Sat, 2007-03-17 at 22:01 -0400, Chabot Denis wrote: Hi, As part of the legend to a plot, I need to have the n in italics because it is a requirement of the journal I aim to publish in: This study, n = 3293 Presently I

Re: [R] Lag operator in R does not work

2007-03-17 Thread jim holtman
What is happening is that by indexing the time series, you are losing the time series attributes. Here is a quick test that I ran. x Time Series: Start = 1 End = 20 Frequency = 1 [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 y - lag(x,1) y Time Series: Start = 0 End = 19

Re: [R] Groups in XYPLOT

2007-03-17 Thread Thomas Colson
Thanks for the warning: Here is the link to the datasets, rather large at 2 and 5 mb. Another note is that one set has more datapoints than the other, don't know if this can be done with xyplot. http://www4.ncsu.edu/~tpcolson/coastcurvfreqs.txt http://www4.ncsu.edu/~tpcolson/coastslopefreqs.txt

[R] Bad points in regression [Broadcast]

2007-03-17 Thread John Maindonald
None of Andy's comments) are inconsistent with the point that rlm() and lqs(), if they disagree with lm(), likely offer better places to start than does lm(), in identifying points that should be examined as in some sense outliers. All such methods are to be used, not as crutches, but as sources

Re: [R] Groups in XYPLOT

2007-03-17 Thread Andrew Robinson
Hi again Thomas, ah, sorry, I should be more precise. Please construct a reproducible worked example that does not require us to download 7 Mb of data. You might also try the suggestions that I made and let us know if they worked for you. Cheers Andrew On Sat, Mar 17, 2007 at 10:37:46PM

Re: [R] Groups in XYPLOT

2007-03-17 Thread Deepayan Sarkar
On 3/17/07, Thomas Colson [EMAIL PROTECTED] wrote: Thanks for the warning: Here is the link to the datasets, rather large at 2 and 5 mb. Another note is that one set has more datapoints than the other, don't know if this can be done with xyplot. As long as the two datasets have the same

Re: [R] Groups in XYPLOT

2007-03-17 Thread Thomas Colson
Sorry 'bout that. Here's about as simple as I can get it: #First dataset N - 25 x - round(rnorm(N),2) y - round(rnorm(N),2) df - data.frame(x = x, y = y) #Plot it xyplot(df$x~df$y,xlab=Test 1 Data,ylab=P(AA*)) #Second Dataset N - 20 x - round(rnorm(N),2) y - round(rnorm(N),2) df - data.frame(x

Re: [R] Groups in XYPLOT

2007-03-17 Thread Thomas Colson
The make.groups function did the trick. Thank you so much for the seemingly obvious solution! piedfac - read.table(C:/R_PLots/piedmontfacfreqs.txt, header=TRUE, sep=,, na.strings=NA, dec=., strip.white=TRUE) coastfac - read.table(C:/R_PLots/coastalfacfreqs.txt, header=TRUE, sep=,,

Re: [R] italics letter in roman string

2007-03-17 Thread Gabor Grothendieck
Try this: plot(1:10) legend(topleft, This ~ study ~ italic(n) == 3293) On 3/17/07, Chabot Denis [EMAIL PROTECTED] wrote: Hi, As part of the legend to a plot, I need to have the n in italics because it is a requirement of the journal I aim to publish in: This study, n = 3293 Presently I

Re: [R] Groups in XYPLOT

2007-03-17 Thread Andrew Robinson
Much nicer, thanks, Thomas. I've made a small change to make the differences more obvious for this example. #First dataset N - 25 x - round(rnorm(N),2) y - round(rnorm(N),2) df.1 - data.frame(x = x, y = y) #Plot it xyplot(x~y,xlab=Test 1 Data,ylab=P(AA*), data=df.1) #Second Dataset N - 20 x -