[R] Decomposing tests of interaction terms in mixed-effects models

2008-08-04 Thread Andrew Robinson
Dear R colleagues, a friend and I are trying to develop a modest workflow for the problem of decomposing tests of higher-order terms into interpretable sets of tests of lower order terms with conditioning. For example, if the interaction between A (3 levels) and C (2 levels) is significant, it

[R] about the 95%CI around the median...

2008-08-04 Thread Fernando Marmolejo Ramos
Dear people I've learnt that by using the boxplot.stats command in the grDevices library I can get the 5-number summaries of a boxplot, plus other important information, like the confidence interval around the median. I'm interested in knowing the actual formula to used in that package to

Re: [R] about the 95%CI around the median...

2008-08-04 Thread Simon Blomberg
See ?fivenum in the stats package. If you just type stats::fivenum you will get the code. The crucial calculations are in the last few lines. Simon. On Mon, 2008-08-04 at 16:19 +0930, Fernando Marmolejo Ramos wrote: Dear people I've learnt that by using the boxplot.stats command in the

Re: [R] graph

2008-08-04 Thread MORNEAU François
Hello, Is ?segments what you are looking for ? François -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de elyakhlifi mustapha Envoyé : vendredi 1 août 2008 17:15 À : r-help@r-project.org Objet : [R] graph Hello.   I don't know how to do to ouput

[R] Major difference in multivariate analyses SPSS and R

2008-08-04 Thread Draga, R.
Dear colleagues, I know SPSS can not compute linear mixed models. I used 'R' before for computing multivariate analyses. But, I never encountered such a major difference in outcome between SPSS and 'R': In SPSS the Pearson correlation between variable 1 and variable 2 is 31% p0.001. In

Re: [R] Sweave and ggplot2

2008-08-04 Thread ONKELINX, Thierry
Dear Sorn, It's hard to guess what your problem is, as you don't provide any sample code. My guess is that the graphics are empty. Did you use print(qplot(...)) or just qplot(). The latter won't work. You need print(qplot(...)) HTH, Thierry

Re: [R] Decomposing tests of interaction terms in mixed-effects models

2008-08-04 Thread Peter Dalgaard
Andrew Robinson wrote: Dear R colleagues, a friend and I are trying to develop a modest workflow for the problem of decomposing tests of higher-order terms into interpretable sets of tests of lower order terms with conditioning. For example, if the interaction between A (3 levels) and C (2

Re: [R] about the 95%CI around the median...

2008-08-04 Thread Gavin Simpson
On Mon, 2008-08-04 at 17:00 +1000, Simon Blomberg wrote: See ?fivenum in the stats package. If you just type stats::fivenum you will get the code. The crucial calculations are in the last few lines. That will only give the code to calculate the five number summary, but Fernando wants to

Re: [R] Unexpected nls behaviour: Solved

2008-08-04 Thread Keith Jewell
Hi Everyone, I'd omitted the non-optional 'parameters' argument to selfStart. Making this change to SSbatch gives the same (successful) result from the two calls to nls. SSbatch-selfStart( model=function(Batch, Coeffs) { Coeffs[Batch] } ,initial=function(mCall, data, LHS) { # Estimate

Re: [R] How to format the output file just the way I want ?

2008-08-04 Thread Pierre8rou
I think I have found the answer myself. If you have something better, please write it. Pierre8r My R code : --- library(quantmod) library(xts) Lines - 2008.07.01,02:00,1.5761,1.5766,1.5760,1.5763,65 2008.07.01,02:15,1.5762,1.5765,1.5757,1.5761,95

Re: [R] source a script file straight from a subversion repository

2008-08-04 Thread Martin Maechler
SM == Steven McKinney [EMAIL PROTECTED] on Fri, 1 Aug 2008 18:38:54 -0700 writes: SM Thanks to Duncan Murdoch and Marc Schwartz for their SM excellent help. SM As we don't yet have the apache http: interface to svn SM running yet, 'svn export' is the access mechanism. yes.

Re: [R] xyplot strip=function for two conditioning variables

2008-08-04 Thread Gabor Grothendieck
Checkout this one: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/82452.html On Mon, Aug 4, 2008 at 6:24 AM, Henning Wildhagen [EMAIL PROTECTED] wrote: Dear list, for a data structure like in df: set.seed(100) Treatment-rep(c(Nitrogen,Carbon, Sulfur),each=9) week-rep(c(1,5,9),3,each=3)

[R] R and emacs

2008-08-04 Thread pir2.jv
I wrote a program truc.r with emacs In emacs, I start the buffer R, then I eval the buffer truc.r (C-c C-b) All is correct and I have my results. But, when I return to Console R, and make: source (truc.r), I obtain an error: Erreur dans source(truc.r) : invalid multibyte character in parser

[R] xyplot strip=function for two conditioning variables

2008-08-04 Thread Henning Wildhagen
Dear list, for a data structure like in df: set.seed(100) Treatment-rep(c(Nitrogen,Carbon, Sulfur),each=9) week-rep(c(1,5,9),3,each=3) genes-rep(c(18s, EF1b, NR),9) copies-rnorm(27, 100,40) df-data.frame(Treatment,week,genes,copies) i wrote this code for a xyplot: library(lattice)

Re: [R] R and emacs

2008-08-04 Thread Peter Dalgaard
pir2.jv wrote: I wrote a program truc.r with emacs In emacs, I start the buffer R, then I eval the buffer truc.r (C-c C-b) All is correct and I have my results. But, when I return to Console R, and make: source (truc.r), I obtain an error: Erreur dans source(truc.r) : invalid multibyte

Re: [R] Exporting data to a text file

2008-08-04 Thread pacomet
Hi John I don't get an error message but a warning write.table(myclara$clustering,cluster.dat,append=TRUE) Warning message: In write.table(myclara$clustering, cluster.dat, append = TRUE) : appending column names to file Here it is the output of str(myclara), it looks strange to me. I think

[R] greek letters in italic font

2008-08-04 Thread Luis Tercero
Dear HelpeRs, I am trying to write axis labels with some letters in cursive for later inclusion in a LaTeX document. The following code does what I want with latin letters (c cursive and the rest not cursive): plot(1:10, 1:10, ylab = expression(italic(c)*(MB))) or plot(1:10, 1:10, ylab =

Re: [R] Plotting ordered nominal data

2008-08-04 Thread Sandy Small
Many thanks I was sure it was simple. That was exactly what I wanted. I should have clarified that I was looking for a box-plot. Thanks to all who responed. Sandy S Ellison wrote: Sandy, You can re-order a factor with df$Eyeball-factor(df$Eyeball, levels=c(Normal, Mild,

Re: [R] greek letters in italic font

2008-08-04 Thread Gabor Grothendieck
You could piece it together using the Hershey fonts for the italic rho: op - par(xpd = NA) plot(1, type = n, ylab = ) u - par(usr) text(u[1] - .1 * diff(u[1:2]), 1, \\*r, vfont = c(serif, italic)) par(op) Now add the rest. ?Hershey ?par ?strwidth On Mon, Aug 4, 2008 at 7:12 AM, Luis Tercero

Re: [R] Decomposing tests of interaction terms in mixed-effects models

2008-08-04 Thread Andrew Robinson
On Mon, Aug 04, 2008 at 10:17:38AM +0200, Peter Dalgaard wrote: Andrew Robinson wrote: Dear R colleagues, a friend and I are trying to develop a modest workflow for the problem of decomposing tests of higher-order terms into interpretable sets of tests of lower order terms with

[R] memory problem - failing to load rgl in R 2.7.1 patched

2008-08-04 Thread Monica Pisica
Hi, yesterday i had the surprise not to be able to load the package ca on R 2.7.0 saying that cannot find required package rgl although it was there. So today i've upgraded to 7.2.1. patched and i got the following error: local({pkg - select.list(sort(.packages(all.available = TRUE))) +

[R] SOLVED - memory problem - failing to load rgl in R 2.7.1 patched

2008-08-04 Thread Monica Pisica
Hi, Sorry for that . Today R did load both ca and rgl packages with no problems ... the single thing i've done since Friday was to put defrag on drive C, i even didn't re-start the computer ...actually it was re-started several time with same weird problem ... so i suppose something was

Re: [R] Decomposing tests of interaction terms in mixed-effects models

2008-08-04 Thread Peter Dalgaard
Andrew Robinson wrote: On Mon, Aug 04, 2008 at 10:17:38AM +0200, Peter Dalgaard wrote: Andrew Robinson wrote: Dear R colleagues, a friend and I are trying to develop a modest workflow for the problem of decomposing tests of higher-order terms into interpretable sets of tests of lower

Re: [R] Decomposing tests of interaction terms in mixed-effects models

2008-08-04 Thread Andrew Robinson
On Mon, Aug 04, 2008 at 02:51:48PM +0200, Peter Dalgaard wrote: Andrew Robinson wrote: On Mon, Aug 04, 2008 at 10:17:38AM +0200, Peter Dalgaard wrote: Andrew Robinson wrote: That is a neat idea, thanks, Peter, but it doesn't quite fit the bill. The summary provides t-tests but I

Re: [R] about the 95%CI around the median...

2008-08-04 Thread Frank E Harrell Jr
Gavin Simpson wrote: On Mon, 2008-08-04 at 17:00 +1000, Simon Blomberg wrote: See ?fivenum in the stats package. If you just type stats::fivenum you will get the code. The crucial calculations are in the last few lines. That will only give the code to calculate the five number summary, but

[R] Trouble when I call a function within another

2008-08-04 Thread bbouling
Greetings, I recently discovered R and how to tackle my own functions. I'm blocked on a simple barrier I guess. I call a function that recognizes a string and return the adequate formula in a main function. This is done through a script. When I type the formula in the main function, it works

[R] Howto Smooth a Curve Created with the Point Function

2008-08-04 Thread Gundala Viswanath
Hi all, I have this figure: http://docs.google.com/Doc?id=df5zfsj4_103rjt2v4d5 created with the following steps: x [1] 90.4 57.8 77.0 103.7 55.4 217.5 68.1 85.3 152.0 113.0 97.1 89.9 [13] 68.1 83.7 77.4 34.5 104.9 170.3 88.6 88.1 108.8 77.4 85.6 82.7 [25] 81.3 108.0

Re: [R] Trouble when I call a function within another

2008-08-04 Thread Duncan Murdoch
bbouling wrote: Greetings, I recently discovered R and how to tackle my own functions. I'm blocked on a simple barrier I guess. I call a function that recognizes a string and return the adequate formula in a main function. This is done through a script. When I type the formula in the main

Re: [R] Howto Smooth a Curve Created with the Point Function

2008-08-04 Thread Ling, Gary (Electronic Trading)
Hi Gundala, You have to reorder the points, like below: #(your code ...) g - cbind(x,g.pdf)[order(x),] points(x=[,1],y=g[,2],type='l',col=red) Cheers, gary -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gundala Viswanath Sent: Monday, August 04, 2008

[R] subset inside a lattice plot using panel.lines

2008-08-04 Thread Michael Hopkins
Hi R people Pulling my hair out here trying to get something very simple to work. Have a data frame of 774 rows and want to plot first and second half on same axes with different colours. A variable is present call 'row' created like this and checked to be OK: row - seq(

[R] subset inside a lattice plot using panel.lines

2008-08-04 Thread Michael Hopkins
Hi R people [duplicate - sorry, just posted HTML by mistake] Pulling my hair out here trying to get something very simple to work. Have a data frame of 774 rows and want to plot first and second half on same axes with different colours. A variable is present call 'row' created like

Re: [R] subset inside a lattice plot using panel.lines

2008-08-04 Thread Mark Difford
Hi Michael, Pulling my hair out here trying to get something very simple to work. ... I can't quite see what you are trying to do [and I am not sure that you clearly state it], but you could make things easier and simpler by (1) creating a factor to identify your groups of rows more cleanly

[R] plot() change unit length

2008-08-04 Thread Qian R
I am try to plot a data frame, and encounter some difficulties.   my x axis range is from -60 to 80 and unit length is 10 so x axis looks like   -60, -40, -20, .., 40,60,80   But I want chang unit length from 10 to 5   -60, -50, -40, .., 60,70,80   Does anyone know how to do it?  

[R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Arthur Roberts
Hi, all, I would like to know if there is any gui interface out there (academic or commercial) that allows one to edit R-language generated graphs (e.g positioning x axis labels.) It would be nice to have something like the user interface of Igor or Origin. I have already used JGR and

Re: [R] plot() change unit length

2008-08-04 Thread jim holtman
You can always create the axis yourself: x - seq(-60,80) plot(x, seq_along(x), xaxt='n') axis(1, at=pretty(x,10)) On Mon, Aug 4, 2008 at 12:47 PM, Qian R [EMAIL PROTECTED] wrote: I am try to plot a data frame, and encounter some difficulties. my x axis range is from -60 to 80 and

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Bert Gunter
No. Can't be. Editable graphs require that the graph be produced via code that produces changeable components. All R graphs are essentially static. That said, caveats: graphs drawn via the grid package functionality -- for example lattice graphs -- **are** produced via changeable code. If you

[R] thematic map of USA

2008-08-04 Thread John P. Burkett
My goal is to prepare a thematic map of the US, with states shaded according to their values for a variable of interest. I would like to include an inset for Alaska in the upper left and an inset for Hawaii in the lower left. If possible, I'd like to use Albers conic projection, or something

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Duncan Murdoch
On 04/08/2008 12:50 PM, Arthur Roberts wrote: Hi, all, I would like to know if there is any gui interface out there (academic or commercial) that allows one to edit R-language generated graphs (e.g positioning x axis labels.) It would be nice to have something like the user interface of

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Bryan Hanson
A colleague of mine, quite by accident, discovered that Adobe Illustrator can manipulate plots made by base graphics, and when you do, many pieces of the plot are separate items that can be manipulated with Illustrator. He cuts and pastes from a Quartz window on his Mac, into Illustrator.

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Peter Dalgaard
Bert Gunter wrote: No. Can't be. Editable graphs require that the graph be produced via code that produces changeable components. All R graphs are essentially static. Well, there's the xfig() device whose output can be edited with xfig This was originally written (by me, for S-PLUS, back

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Gabor Grothendieck
Microsoft Word's graphics editor can edit R graphics saved in metafile format, wmf. That includes x axis labels, etc. On Mon, Aug 4, 2008 at 12:50 PM, Arthur Roberts [EMAIL PROTECTED] wrote: Hi, all, I would like to know if there is any gui interface out there (academic or commercial)

Re: [R] thematic map of USA

2008-08-04 Thread Duncan Murdoch
On 04/08/2008 1:14 PM, John P. Burkett wrote: My goal is to prepare a thematic map of the US, with states shaded according to their values for a variable of interest. I would like to include an inset for Alaska in the upper left and an inset for Hawaii in the lower left. If possible, I'd like

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Peter Dalgaard
Peter Dalgaard wrote: Bert Gunter wrote: No. Can't be. Editable graphs require that the graph be produced via code that produces changeable components. All R graphs are essentially static. Well, there's the xfig() device whose output can be edited with xfig This was originally written

[R] Sorting a matrix by a column

2008-08-04 Thread John Sorkin
R 2.6 Windows XP I have a 100x4 matirx data-matrix(nrow=100,ncol=4) I would like to sort the entire matrix by column two, i.e. data[,2] I looked at the help page for sort() but can not determine how I can use it to sort a matrix on one of the matrix's columns. Thanks, John John David Sorkin

Re: [R] Sorting a matrix by a column

2008-08-04 Thread Prof Brian Ripley
On Mon, 4 Aug 2008, John Sorkin wrote: R 2.6 Windows XP I have a 100x4 matirx data-matrix(nrow=100,ncol=4) I would like to sort the entire matrix by column two, i.e. data[,2] I looked at the help page for sort() but can not determine how I can use it to sort a matrix on one of the matrix's

Re: [R] Sorting a matrix by a column

2008-08-04 Thread Dimitris Rizopoulos
probably you need order(), e.g., data[order(data[, 2]), ] I hope it helps. Best, Dimitris John Sorkin wrote: R 2.6 Windows XP I have a 100x4 matirx data-matrix(nrow=100,ncol=4) I would like to sort the entire matrix by column two, i.e. data[,2] I looked at the help page for sort() but

[R] Long Range Dependence: Hurst exponent estimation

2008-08-04 Thread tolga . i . uzuner
Dear R Users, Can anyone point me to a package for R vrsion 2.7.1 which implements some Hurst exponent estimation methods ? Thanks in advance, Tolga Generally, this communication is for informational purposes only and it is not intended as an offer or solicitation for the purchase or sale of

[R] FW: Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Bert Gunter
Well, just goes to show you how much I know! Glad you were able to get some help. -- Bert -Original Message- From: Arthur Roberts [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2008 12:05 PM To: Bert Gunter Subject: Re: [R] Are there any guis out there,which will allow editing of

Re: [R] xyplot strip=function for two conditioning variables

2008-08-04 Thread Deepayan Sarkar
On Mon, Aug 4, 2008 at 3:36 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Checkout this one: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/82452.html And there's a wrapper for this in the latticeExtra package: library(latticeExtra) useOuterStrips(xyplot(data=df,

[R] Is there any way to make pretty tables in R to pdf?

2008-08-04 Thread Arthur Roberts
Hi, all, All your comments have been very useful. I was wondering if there was a package that can make pretty R tables to pdf. I guess I could use xtable, but I would like something a little more elegant. Your input is greatly appreciated. Best wishes, Art

Re: [R] subset inside a lattice plot using panel.lines

2008-08-04 Thread Deepayan Sarkar
On Mon, Aug 4, 2008 at 8:44 AM, Mark Difford [EMAIL PROTECTED] wrote: Hi Michael, Pulling my hair out here trying to get something very simple to work. ... I can't quite see what you are trying to do [and I am not sure that you clearly state it], but you could make things easier and simpler

[R] backslash in character string?

2008-08-04 Thread zack holden
Dear list, After searching many old posts, I can't find the solution to a simple problem. can someone tell me how to create a character string with multiple backslashes, as in: file_dir - c(C:\files\data\) I need to create this string and then paste it to many files names for batch

[R] an interesting finding on Hurst exponent estimation from fSeries

2008-08-04 Thread tolga . i . uzuner
Dear R Users, I am using code from the following links to do Hurst exponent estimation. link: http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php?rev=1root=rmetricsview=rev file: LongRangeDependence.R Take a look at the following run: x-(cos((1:200)/10)) rsFit(diff(x,15))@hurst$H [1]

Re: [R] backslash in character string?

2008-08-04 Thread Henrique Dallazuanna
Try: file_dir - C:\\files\\data\\ On Mon, Aug 4, 2008 at 5:02 PM, zack holden [EMAIL PROTECTED] wrote: Dear list, After searching many old posts, I can't find the solution to a simple problem. can someone tell me how to create a character string with multiple backslashes, as in:

Re: [R] Is there any way to make pretty tables in R to pdf?

2008-08-04 Thread Mark Difford
Hi Arthur, I was wondering if there was a package that can make pretty R tables to pdf. You got through TeX/LateX, but PDF could be your terminus. Package Hmisc: ? summary.formula and its various arguments and options. You can't get much better.

Re: [R] Long Range Dependence: Hurst exponent estimation

2008-08-04 Thread tolga . i . uzuner
Thanks Gary. That package is a bit weird. When one installs and loads it up, you don't actually get any of those functions. One has to go to the following link: http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php?rev=1root=rmetricsview=rev and then download and source the file

Re: [R] Is there any way to make pretty tables in R to pdf?

2008-08-04 Thread Mark Difford
Hi Arthur, Sorry, sent you down the wrong track: this will help you to get there: http://biostat.mc.vanderbilt.edu/twiki/pub/Main/StatReport/summary.pdf Regards, Mark. Arthur Roberts wrote: Hi, all, All your comments have been very useful. I was wondering if there was a package

Re: [R] backslash in character string?

2008-08-04 Thread Christoph Heibl
You have to escape every backslash by a second backslash - try this: f - C:\\files\\data\\ # create character string write(f, ) # write to file system(open -t ) # see what happen to the character string file_dir - c(C:\files\data\)

Re: [R] History pruning

2008-08-04 Thread Ken Williams
On 8/1/08 1:13 PM, Richard M. Heiberger [EMAIL PROTECTED] wrote: I meant 5a 5b 5c. Multiple-line commands are handled correctly. What is is doing is looking for and + prompts. Anything else is removed. When I said 5c) prune any lines that don't have assignment operators I meant to

[R] simulate data based on partial correlation matrix

2008-08-04 Thread Benjamin Michael Kelcey
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order

Re: [R] problem with nested loop for regression

2008-08-04 Thread rcoder
Hi, I guess my question is really more about the nested for loop construct and whether it is doing what I intend it to do in my code in the previous post. I would be grateful if anyone who has used nested loops could let me know if I am doing something wrong. Thanks, rcoder rcoder wrote:

[R] Turning Cross-tab into new data frame

2008-08-04 Thread Spencer
Dear R Experts, I am wondering if anyone has a solution to the following: I am creating some cross-tabulation tables and want to input the results from these tables into a new set of functions. Is there a way to turn the cross-tab table into a new dataset? I haven't yet been able to

Re: [R] Lattice: How to draw curves from given formulae

2008-08-04 Thread John Smith
I have another questions. How can I type specific names into strips of the resulting plot? For instance, in the resulting figure from the attached code, instead of 'umbrella(d)', I want have 'UMBRELLA' in the strip. library(lattice) flat - function(d) 0 * d linear - function(d) -(1.65/8)

[R] simulate data based on partial correlation matrix

2008-08-04 Thread Benjamin Michael Kelcey
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order

Re: [R] Long Range Dependence: Hurst exponent estimation

2008-08-04 Thread Hans W. Borchers
There is the 'fdim' package that computes the fractal dimension D. Between D and the Hurst exponent H there should be a relation D = 2 - H I wonder if this is true when computing D and H with different approaches Regards, Hans Werner Borchers ABB Corporate Research tolga.i.uzuner at

[R] Multivariate Regression with Weights

2008-08-04 Thread Zhang Yanwei - Princeton-MRAm
Hi all, I'd like to fit a multivariate regression with the variance of the error term porportional to the predictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify

Re: [R] about the 95%CI around the median...

2008-08-04 Thread Rolf Turner
On 5/08/2008, at 1:31 AM, Frank E Harrell Jr wrote: snip I wonder why we don't just use the exact nonparametric confidence interval for the median, which is just as easy to compute. Also, it will be asymmetric if the data are skewed, as it should be. snip The

Re: [R] Multivariate Regression with Weights

2008-08-04 Thread Zhang Yanwei - Princeton-MRAm
Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2008 5:15 PM To: Zhang Yanwei - Princeton-MRAm

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Hans W. Borchers
Duncan Murdoch murdoch at stats.uwo.ca writes: On 04/08/2008 12:50 PM, Arthur Roberts wrote: Hi, all, I would like to know if there is any gui interface out there (academic or commercial) that allows one to edit R-language generated graphs (e.g positioning x axis labels.) It

[R] log and Log Histogram

2008-08-04 Thread Alessandro
Hi All, I have a X,Y and Z text file. I wish modify the X value in a logarithmic value and to plot all log(Z) with Histogram. I try different code but I have a problem to find the solution. Thank you very much Ale [[alternative HTML version deleted]]

Re: [R] log and Log Histogram

2008-08-04 Thread David Scott
On Mon, 4 Aug 2008, Alessandro wrote: Hi All, I have a X,Y and Z text file. I wish modify the X value in a logarithmic value and to plot all log(Z) with Histogram. I try different code but I have a problem to find the solution. My package HyperbolicDist has a log histogram function.

[R] R init file and source()

2008-08-04 Thread Allin Cottrell
In the context of calling R from another program (namely gretl, http://gretl.sourceforge.net ) I'm trying to understand the interactions of the R init file (corresponding to the environment variable RPROFILE) and the source() function. I'll illustrate my problem with the following simplified

[R] Constrained Optimization

2008-08-04 Thread alan . ng
Hello, I am trying to run a constrained optimization in R. constrOptim is really useful and has helped me a lot, but unfortunately, it doesn't provide the hessian. Is there a solution to this problem? I've tried optim with penalty-functions and L-BFGS-B, but it doesn't help. Alan. --

[R] R: log and Log Histogram

2008-08-04 Thread Alessandro
Hi david, I tried HyperbolicDist but I have this problem (I wish transform Z value) Library (HyperbolicDist) Data (testground) # X,Y and Z value in txt file changetestground - testground[-length(testground)]/testground[-1] hist(change) Error in hist.default(change) : 'x' deve essere numeric

Re: [R] Lattice: How to draw curves from given formulae

2008-08-04 Thread Deepayan Sarkar
On Mon, Aug 4, 2008 at 1:39 PM, John Smith [EMAIL PROTECTED] wrote: I have another questions. How can I type specific names into strips of the resulting plot? For instance, in the resulting figure from the attached code, instead of 'umbrella(d)', I want have 'UMBRELLA' in the strip.

Re: [R] problem with nested loop for regression

2008-08-04 Thread jim holtman
Exactly what problem are you having? There is nothing wrong with nested for loops, so what is leading you to believe you have a problem? I ran your program and it seems to terminate. Most of the time seems to have been spent in the following statement:

[R] Create data frame from header only

2008-08-04 Thread Etienne Bellemare Racine
Hi all, Given a string list, paste(A,1:5,sep=) [1] A1 A2 A3 A4 A5 I would like to create an empty data frame using that list as the header, so I can access my data frame column using, df [ list [ i ] ] Anyone ? Thanks, Etienne [[alternative HTML version deleted]]

Re: [R] Sweave and ggplot2

2008-08-04 Thread Sorn . Norng
Dear Thierry, Your guess was correct. I was not aware that I needed print( ). It was not needed with plot( ). I have yet to try xyplot( ) but I suspect that the print( ) might be needed here as well. Thank you very much for your help. Cheers, Sorn ONKELINX, Thierry [EMAIL PROTECTED]

Re: [R] Create data frame from header only

2008-08-04 Thread milton ruser
Hi Etienne It is not so elegant, bu I think that work. colname.list-paste(A,1:5,sep=) df-data.frame(matrix(matrix(rep(1,length(colname.list)),1),1)) df colnames(df)-colname.list df df-df[-1,] df Cheers, Miltinho Astronauta Brazil On 8/4/08, Etienne Bellemare Racine [EMAIL PROTECTED]

Re: [R] problem with nested loop for regression

2008-08-04 Thread jim holtman
Actually now that I read it closer, I see what your problem is. what did you think the statement: Preg[,k]-coef(lm(tt~sel_col)) was going to do? Preg is a 200x100 matrix and you are only storing two values (the coefficients) so they will be repeated 100 times in the column. So there is

Re: [R] Create data frame from header only

2008-08-04 Thread Marc Schwartz
on 08/04/2008 07:40 PM Etienne Bellemare Racine wrote: Hi all, Given a string list, paste(A,1:5,sep=) [1] A1 A2 A3 A4 A5 I would like to create an empty data frame using that list as the header, so I can access my data frame column using, df [ list [ i ] ] Anyone ? Thanks,

Re: [R] Create data frame from header only

2008-08-04 Thread Etienne B. Racine
Even if it's not so elegant, I will bind it in a function, so I don't have to bother with that anymore. I think there should be a simple function in R to initialize an empty data frame. From what I've read, it is a recurrent question on that list. #Create an empty data frame from a header list

Re: [R] Create data frame from header only

2008-08-04 Thread Henrik Bengtsson
See dataFrame() in R.utils. It was design for the purpose of allocating empty data frames in an efficient way. Example: library(R.utils); df - dataFrame(colClasses=c(a=integer, b=double), nrow=10); str(df) 'data.frame': 10 obs. of 2 variables: $ a: int 0 0 0 0 0 0 0 0 0 0 $ b: num 0 0

[R] normalize a data-set

2008-08-04 Thread Alessandro
Dear All, I have a dataset (X,Y and Z) with no-normalize distribution (I saw with qqnorm) but with Gaussian shape. I am a not good statistic and I wish to know a method to normalize Z values. Thanks for help. It's very useful for my PhD ALe [[alternative HTML version

[R] optimize simultaneously two binomials inequalities using nlm( ) or optim( )

2008-08-04 Thread emir.toktar
Dear R users, I´m trying to optimize simultaneously two binomials inequalities (used in acceptance sampling) which are nonlinear solution, so there is no simple direct solution. Please, let me explain shortly the the problem and the question as following. The objective is to obtain the smallest

[R] I have an array of plots and I would like to put a title on the whole array.

2008-08-04 Thread Arthur Roberts
Hi, all, Does anyone know of a way to get a title on an array of plots? I have tried to use title, mtext, and text to get the title on the array, but to no avail. I would like something like the following. title(Big Array) par(mfrow=c(2,4)) plot(x1,y1) plot(x2,y2) .. .. .. Much

Re: [R] Create data frame from header only

2008-08-04 Thread Prof Brian Ripley
On Mon, 4 Aug 2008, Etienne B. Racine wrote: Even if it's not so elegant, I will bind it in a function, so I don't have to bother with that anymore. I think there should be a simple function in R to initialize an empty data frame. From what I've read, it is a recurrent question on that list.

Re: [R] I have an array of plots and I would like to put a title on the whole array.

2008-08-04 Thread Prof Brian Ripley
par(mfrow=c(2,4), oma=c(0,0,1,0)) plots ... title(Big Array, outer=TRUE) You need to set up an outer margin. See 'An Introduction to R' for that topic. You probably want to reset the margins (mar=) for such a large array of plots. On Mon, 4 Aug 2008, Arthur Roberts wrote: Hi, all, Does

[R] 95% CI bands on a Lowess smoother

2008-08-04 Thread Gareth Campbell
Hi there, I'm plotting some glass RI values just by plotting plot(x) then I put on my lowess smoother lines(lowess(x)) now I want to put on some 95% Confidence Interval bands of the lowess smoother, but don't know how?? Thanks -- Gareth Campbell PhD Candidate The University of Auckland P

Re: [R] Constrained Optimization

2008-08-04 Thread Hans W. Borchers
alan.ng at gmx.net writes: Hello, I am trying to run a constrained optimization in R. constrOptim is really useful and has helped me a lot, but unfortunately, it doesn't provide the hessian. Is there a solution to this problem? You didn't provide an example to understand why 'optim'

Re: [R] 95% CI bands on a Lowess smoother

2008-08-04 Thread Prof Brian Ripley
On Tue, 5 Aug 2008, Gareth Campbell wrote: Hi there, I'm plotting some glass RI values just by plotting plot(x) then I put on my lowess smoother lines(lowess(x)) now I want to put on some 95% Confidence Interval bands of the lowess smoother, but don't know how?? You can have pointwise

[R] Including exogenous X-variables in ARFIMA models

2008-08-04 Thread Scotty Nelson
Does anybody know if there is a way to include exogenous X-variables in an ARFIMA model? It appears the ARFIMA function in fracdiff does not support this. Supposing there is nothing already written, and I wanted to modify the existing arfima function, how would I go about this? Would I need to