Re: [R] R environment
Unfortunately Duncan's suggestion to restart is probably the only way to go here. I've done similar thing myself too. What I've learned was that it is clever to include a so called hot-patch mechanism in your code, which will load R source code found in a certain directory, say, hot/, once in a while (easy if you have do interations) and at the end of the batch code. Here is the idea (typed out of my head): patchCode - function(path=hot, pattern=[.]R$, removeAfter=FALSE, ...) { files - list.files(pattern=pattern, path=path, full.names=TRUE); for (file in files) { tryCatch({ # You don't want you patch code to kill you batch job, # if you for instance have a typo. cat(Hot-path file: , file, \n); source(file); # Remove the file afterwards? Especially useful if you only # want to redefine functions, and patch once. This way you # can also see what files has successfully been source():ed. if (removeAfter) file.remove(file); }, error = function(ex) { cat(Ignored error when sourcing:\n); print(ex); }) } } # patchCode() Then in your batch code something like this: while (!converged) { # Patch the code every iteration. patchCode(path=hot/, removeAfter=TRUE) # The rest of your code here } # Put the code you want to call at the end, in a directory # of its own. patchCode(path=hot/onFinally/, removeAfter=TRUE) # End of your batch code Cheers Henrik Duncan Murdoch wrote: Jean Eid wrote: This is probably a weird question but I need to know if there is a way... I run an R batch job without saving the variables at each step to the disk. Is there a way to invoke another session of R and link it to the same environment for read only. The problem is that I am running optim with every step getting the parameters into the global env using - However, I forgot to issue a save(list=ls(),...) right after so I can load and see how the parameters are changing. It's been couple of days and it is still running so I am hoping that I can invoke another session of R and link it to the environment of the batch session. Does this sound totally ridiculous ? it is a debian machine with R 2.1.1 If you happened to have compiled R with debug information, you might be able to use gdb or another debugger to examine variables in the running process, but you probably didn't, and it's probably easier to kill the job, fix it, and start it again, than it would be to learn how to see the active variables using gdb. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Block-diagonal matrix
Hi adiag() from the magic package does what you want: library(magic) Loading required package: abind a - matrix(1,2,2) b - matrix(6,2,3) adiag(a,b) [,1] [,2] [,3] [,4] [,5] [1,]11000 [2,]11000 [3,]00666 [4,]00666 HTH rksh On 1 Sep 2005, at 00:25, Caio Lucidius Naberezny Azevedo wrote: Dear R-users, Does anybody know how to construct a block-diagonal matrix (with the blocks being different matrixs, concerning the dimension and the values), without use loops ? Thanks all, Caio - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] source(file) = file becomes readonly
Hello, when I work in R, I write code in a text file that I run with the source(filename) command. In R2.1.1 the file is read-only while the source command is executed. This was not the case in R2.0.1. Is this a bug-fix or is it possible not to have the file read-only when executed? Best regards Vidar __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Robust Regression - LTS
Hi, I am using robust regression, i.e. model.robust-ltsreg(MXD~ORR,data=DATA). My question:- is there any way to determine the Robust Multiple R-Squared (as returned in the summary output in splus)? I found an equivalent model in the rrcov package which included R-square, residuals etc in it's list of components, but when I used this package the only results returned were equivalent to the LTS reg in the MASS package, which obviously indicates that the summary method does not work for this class of models. If required: ##The output for the LTS reg (MASS) using print and summary Call: lqs.formula(formula = MXD ~ ORR, data = DATA, method = lts) Coefficients: (Intercept)ORR 7.578e+082.533e+01 Scale estimates 1.333e+09 1.303e+09 Length Class Mode crit 1 -none- numeric sing 1 -none- character coefficients 2 -none- numeric bestone 2 -none- numeric fitted.values 4899 -none- numeric residuals 4899 -none- numeric scale2 -none- numeric terms3 terms call call 4 -none- call xlevels 0 -none- list model2 data.frame list ## The output for the LTS reg (rrcov) using print and summary Coefficients: Intercept ORR 1.178e+09 2.387e+01 Scale estimate 1.722e+09 Length Class Mode best 2451 -none- numeric raw.coefficients2 -none- numeric alpha 1 -none- numeric quan1 -none- numeric raw.scale 1 -none- numeric raw.resid4899 -none- numeric coefficients2 -none- numeric scale 1 -none- numeric resid4899 -none- numeric lts.wt 4899 -none- numeric crit1 -none- numeric rsquared1 -none- numeric residuals4899 -none- numeric intercept 1 -none- logical method 1 -none- character RD 4899 -none- numeric X9798 -none- numeric Y4899 -none- numeric fitted.values4899 -none- numeric ## The output for the LTS reg (SPLUS) using print and summary {What I am wanting to achieve in R} model.robust-ltsreg(MXD~ORR,data=DATA,na.action=na.exclude) print(model.robust) Method: Least Trimmed Squares Robust Regression. Call: ltsreg(formula = MXD ~ ORR, data = DATA, na.action = na.exclude) Coefficients: Intercept ORR 1.465502e+009 2.325200e+001 Scale estimate of residuals: 163900 Total number of observations: 4899 Number of observations that determine the LTS estimate: 4409 summary(model.robust) Method: [1] Least Trimmed Squares Robust Regression. Call: ltsreg(formula = MXD ~ ORR, data = DATA, na.action = na.exclude) Coefficients: Intercept ORR 1.465502e+009 2.325200e+001 Scale estimate of residuals: 163900 Robust Multiple R-Squared: 0.4733 Total number of observations: 4899 Number of observations that determine the LTS estimate: 4409 Residuals: Min. 1st Qu.Median 3rd Qu. Max. -228135629879 -1032103953-2313756371234533512 55539148696 Weights: 01 588 4311 Thanks very much for any help you can offer. Kylie-Anne Richards __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] best c++ matrix library?
Thanks for everyone who replied to my question. I tried newmat myself, seems to be working well. What I am interested in is something like * Fast element-wise operations. You know, it may be slow in R. * (Some) control over memory allocation. I would like to specify when the matrix should not be copied. * Compatibility with R. At least the way how the matrix data is represented in memory should be the same as R has. Otherwise, the data interchange may become slow and memory-consuming. * And, of course, the basic matrix operations like multiplication, inverting, eigenvalues etc I am using linux/gcc if that matters. Best, Ott | From: Tuszynski, Jaroslaw W. [EMAIL PROTECTED] | Date: Wed, 31 Aug 2005 12:59:04 -0400 | | What kind of matrix operations do you need? | | Jarek | | -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] On Behalf Of Ott Toomet | Sent: Wednesday, August 31, 2005 12:54 PM | To: r-help@stat.math.ethz.ch | Subject: [R] best c++ matrix library? | | Hi folks, | | I am planning to write some more time-consuming matrix manipulations in c++. | What is the experience with the existing c++ matrix libraries? Do you have | some recommendations? Are some libraries more compatible with R than the | others? | | All suggestions welcome! | | Best, | Ott __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] News from your Bank
Aeacides [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] best c++ matrix library?
Le 01.09.2005 10:32, Ott Toomet a écrit : Thanks for everyone who replied to my question. I tried newmat myself, seems to be working well. What I am interested in is something like * Fast element-wise operations. You know, it may be slow in R. * (Some) control over memory allocation. I would like to specify when the matrix should not be copied. * Compatibility with R. At least the way how the matrix data is represented in memory should be the same as R has. Otherwise, the data interchange may become slow and memory-consuming. * And, of course, the basic matrix operations like multiplication, inverting, eigenvalues etc I am using linux/gcc if that matters. Best, Ott | From: Tuszynski, Jaroslaw W. [EMAIL PROTECTED] | Date: Wed, 31 Aug 2005 12:59:04 -0400 | | What kind of matrix operations do you need? | | Jarek | | -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] On Behalf Of Ott Toomet | Sent: Wednesday, August 31, 2005 12:54 PM | To: r-help@stat.math.ethz.ch | Subject: [R] best c++ matrix library? | | Hi folks, | | I am planning to write some more time-consuming matrix manipulations in c++. | What is the experience with the existing c++ matrix libraries? Do you have | some recommendations? Are some libraries more compatible with R than the | others? | | All suggestions welcome! | | Best, | Ott Hello, CPPLAPACK : http://cpplapack.sourceforge.net/ is a c++ wrapper for lapack routines. It is not so complicated to use once you have blas and lapack installed. I think it is much faster than newmat. Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques ~ ~~ Romain FRANCOIS - http://addictedtor.free.fr ~~ Etudiant ISUP - CS3 - Industrie et Services ~~http://www.isup.cicrp.jussieu.fr/ ~~ Stagiaire INRIA Futurs - Equipe SELECT ~~ http://www.inria.fr/recherche/equipes/select.fr.html~~ ~ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] standard deviation in barplots
Is there any function to plot the standard deviation with the barplots _ _ | Deviation |--- | -| | | | | Barplot | | | | | | with regards Knut Krueger __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] standard deviation in barplots
On 9/1/05 6:32 AM, Knut Krueger [EMAIL PROTECTED] wrote: Is there any function to plot the standard deviation with the barplots _ _ | Deviation |--- | -| | | | | Barplot | | | | | | I think barplot2 in the gregmisc (gplots) bundle will do that. Sean __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Digest reading is tedious
Hi Trevor, please excuse my late reply; your e-mail was sent when I started travelling (to Seattle and the DSC and Bioconductor workshops there). Also, I hope you don't mind if I follow this up on R-help, since there, the thread started and this does related to it. Trevor == Trevor Hastie [EMAIL PROTECTED] on Thu, 11 Aug 2005 11:06:08 -0700 writes: Trevor Dear Martin I may still be doing something wrong. Trevor Here is what I see now in Mozilla Firefox (attached Trevor jpeg file of screen dump) isn't that Thunderbird ? Firefox the web browser, Thunderbird the mail client? Trevor This is still not the convenient layout I was Trevor envisaging. Ideally one would have the usual list Trevor of contributions, with authors, and they would be Trevor clickable I've now looked at your screen shot and agree this is really not satisfactory. {In my good old Emacs VM mail reader things are different: all is nice with a virtual mail folder of individual messages} Hmm, I've checked : The MIME type used for the whole digest is 'Content-Type: multipart/digest' and then 'Content-Type: message/rfc822' for each individual message. Since there *are* mail clients that nicely support these MIME types, I wonder why thunderbird does not. I'd say this is clearly a deficiency in thunderbird; or is it something you could optionally configure to it? What are other readers' experiences with mailman mailing lists in digest mode -- using MIME type delivery? Regards, Martin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R environment
Thank you all for the answers. I will look into both methods for doing so. Jean On Thu, 1 Sep 2005, Henrik Bengtsson wrote: Unfortunately Duncan's suggestion to restart is probably the only way to go here. I've done similar thing myself too. What I've learned was that it is clever to include a so called hot-patch mechanism in your code, which will load R source code found in a certain directory, say, hot/, once in a while (easy if you have do interations) and at the end of the batch code. Here is the idea (typed out of my head): patchCode - function(path=hot, pattern=[.]R$, removeAfter=FALSE, ...) { files - list.files(pattern=pattern, path=path, full.names=TRUE); for (file in files) { tryCatch({ # You don't want you patch code to kill you batch job, # if you for instance have a typo. cat(Hot-path file: , file, \n); source(file); # Remove the file afterwards? Especially useful if you only # want to redefine functions, and patch once. This way you # can also see what files has successfully been source():ed. if (removeAfter) file.remove(file); }, error = function(ex) { cat(Ignored error when sourcing:\n); print(ex); }) } } # patchCode() Then in your batch code something like this: while (!converged) { # Patch the code every iteration. patchCode(path=hot/, removeAfter=TRUE) # The rest of your code here } # Put the code you want to call at the end, in a directory # of its own. patchCode(path=hot/onFinally/, removeAfter=TRUE) # End of your batch code Cheers Henrik Duncan Murdoch wrote: Jean Eid wrote: This is probably a weird question but I need to know if there is a way... I run an R batch job without saving the variables at each step to the disk. Is there a way to invoke another session of R and link it to the same environment for read only. The problem is that I am running optim with every step getting the parameters into the global env using - However, I forgot to issue a save(list=ls(),...) right after so I can load and see how the parameters are changing. It's been couple of days and it is still running so I am hoping that I can invoke another session of R and link it to the environment of the batch session. Does this sound totally ridiculous ? it is a debian machine with R 2.1.1 If you happened to have compiled R with debug information, you might be able to use gdb or another debugger to examine variables in the running process, but you probably didn't, and it's probably easier to kill the job, fix it, and start it again, than it would be to learn how to see the active variables using gdb. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] best c++ matrix library?
Romain == Romain Francois [EMAIL PROTECTED] on Thu, 01 Sep 2005 11:19:59 +0200 writes: Romain Le 01.09.2005 10:32, Ott Toomet a écrit : Thanks for everyone who replied to my question. I tried newmat myself, seems to be working well. What I am interested in is something like * Fast element-wise operations. You know, it may be slow in R. * (Some) control over memory allocation. I would like to specify when the matrix should not be copied. * Compatibility with R. At least the way how the matrix data is represented in memory should be the same as R has. Otherwise, the data interchange may become slow and memory-consuming. * And, of course, the basic matrix operations like multiplication, inverting, eigenvalues etc I am using linux/gcc if that matters. Best, Ott | From: Tuszynski, Jaroslaw W. [EMAIL PROTECTED] | Date: Wed, 31 Aug 2005 12:59:04 -0400 | | What kind of matrix operations do you need? | | Jarek | | -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] On Behalf Of Ott Toomet | Sent: Wednesday, August 31, 2005 12:54 PM | To: r-help@stat.math.ethz.ch | Subject: [R] best c++ matrix library? | | Hi folks, | | I am planning to write some more time-consuming matrix manipulations in c++. | What is the experience with the existing c++ matrix libraries? Do you have | some recommendations? Are some libraries more compatible with R than the | others? | | All suggestions welcome! | | Best, | Ott Romain Hello, Romain CPPLAPACK : http://cpplapack.sourceforge.net/ is a Romain c++ wrapper for lapack routines. It is not so Romain complicated to use once you have blas and lapack Romain installed. I think it is much faster than newmat. LAPACK is ``state of the art'' of numerical algebra. Don't use anything else if you don't have to. It's definitely *much* more ``compatible with R'' since we base almost all our matrix computations on LAPACK. GNU octave and commercial Matlab are also entirely based on LAPACK for the matrix computations. I have no idea about the CPP (= c++) part in CPPLAPACK though. The CRAN package 'Matrix' has several objectives, notably *sparse* matrix computations. But it also uses LAPACK for dense matric computations, AFAIR also for a few things not available (via LAPACK) in core R. Martin Maechler, ETH Zurich __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] ROracle under windows
Hello, Iâm currently working with Oracle under windows and Iâd like to use the ROracle package which exists only for linux/unix. Is there any possibility to port this package under windows? L. Tessier [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] convex-polygon in scatter plot
Hello, I am trying to draw a convex-polygon (envelope) connecting the outer points (of a particular class) in a scatter plot [which I want to do to illustrate the range of a particular type of samples in an ordination plot]. Is there any function to plot this kind of polygon? Kind regards Zlatko Petrin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] convex-polygon in scatter plot
Hi, ever thought about using the built-in help of R? try example(chull) cu detlef On Thu, 1 Sep 2005 13:51:42 +0200 Zlatko Petrin [EMAIL PROTECTED] wrote: Hello, I am trying to draw a convex-polygon (envelope) connecting the outer points (of a particular class) in a scatter plot [which I want to do to illustrate the range of a particular type of samples in an ordination plot]. Is there any function to plot this kind of polygon? Kind regards Zlatko Petrin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Newbie help on dim
Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
yes it is correct! look at ?dim() for more info. In this case you need length(), i.e., Z - rnorm(50) length(Z) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015 Web: http://www.med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Christian Prinoth [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, September 01, 2005 2:00 PM Subject: [R] Newbie help on dim Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
Check out the dim vs length for vectors thread: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50720.html This thread goes through the bug-or-feature discussion which is always entertaining from a socio-R perspective. Also, note Dim with a capital D doesn't exist. HTH, Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Prinoth Sent: Thursday, September 01, 2005 8:01 AM To: r-help@stat.math.ethz.ch Subject: [R] Newbie help on dim Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] ROracle under windows
Laurent TESSIER wrote: Hello, I’m currently working with Oracle under windows and I’d like to use the ROracle package which exists only for linux/unix. Is there any possibility to port this package under windows? It is ported, but perhaps you need some additional files: See http://stat.bell-labs.com/RS-DBI/download/index.html for the binary package provided by David James and read the comments. Uwe Ligges L. Tessier [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
Christian Prinoth wrote: Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? No, because Z has no dim attribute. ?dim tells you: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL or a vector of mode integer. TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] source(file) = file becomes readonly
Hjellvik Vidar wrote: Hello, when I work in R, I write code in a text file that I run with the source(filename) command. In R2.1.1 the file is read-only while the source command is executed. This was not the case in R2.0.1. Is this a bug-fix or is it possible not to have the file read-only when executed? So you want to modify a file *while* it is executed? Sounds dangerous to me, you may want to explain further... BTW: Which OS are we talking about? Uwe Ligges Best regards Vidar __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
Should the Value: section of the help page read: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL for a vector of mode integer. NOTE: for not or in the second sentence. Uwe Ligges wrote: Christian Prinoth wrote: Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? No, because Z has no dim attribute. ?dim tells you: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL or a vector of mode integer. TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Dataset size in R
[EMAIL PROTECTED] wrote: Dear listers, I would like to know whether a maximum size is set for data sets in R. Well, in theory, there are some limits re. size of some integers, but you are far away, as far as I understand. In practice, you will somewhere hit the limit of available memory in your machine. I'm planning on analysing data sets which have 33 points for a sample. The response is from GCxGC output. I don't understand this point: How many observations and how many variables? Also, with data analysis, is there a time-cost saving by performing the analysis in Linux as against doing it in Windows XP? Depends on the problem. For really huge data, you might want to use a 64bit machine, 64bit adressing for a single R process is (yet) only supported on Linux. If memory does not matter, Linux is sometimes a bit faster, but it depends also on other facts like using CPU optimized linear algebra systems such as ATLAS or Goto's BLAS. Uwe Ligges Many thanks, Peter [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Using non-gcc compilers with install.packages()
Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO. Cheers, -- Trond Hasle Amundsen [EMAIL PROTECTED] Center for Information Technology Services, University of Oslo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
Chuck Cleland wrote: Should the Value: section of the help page read: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL for a vector of mode integer. NOTE: for not or in the second sentence. NO!!! The help page is correct! The *value* is either NULL *or* a vector of mode integer. It is always NULL for any vector without dim attribute (also for character vectors!): x - a dim(x) # NULL dim(x) - 1 dim(x) # 1 Uwe Ligges Uwe Ligges wrote: Christian Prinoth wrote: Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? No, because Z has no dim attribute. ?dim tells you: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL or a vector of mode integer. TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] VarCorr function for assigning random effects: was Question
If you are indeed using lme and not lmer then the needed function is VarCorr(). However, 2 recommendations. First, this is a busy list and better emails subject headers get better attention. Second, I would recommend using lmer as it is much faster. However, VarCorr seems to be incompatible with lmer and I do not know of another function to work with lmer. Hence, a better email subject header will attract the attention of others *much* smarter than me! I hope this helps, Harold -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mahmoud Torabi Sent: Wednesday, August 31, 2005 9:51 PM To: R-help@stat.math.ethz.ch Cc: [EMAIL PROTECTED] Subject: [R] Question Dear Sir/Madam I would be pleased if anybody can help me. I'm using linear mixed model (lme) function.I'm doing some simulation in my research and need to be assigned variance components values during of my program. Specifically, when I use lme function, I can get some information by use summary() and I can assign some valuse like variance of fixed parameters and variance of random error term by using for example varFix and sigma.But I don't know how I can assign for variance of random effect. I know in SPLUS we have command var.ran, how about R ? Thanks alot. M.Torabi __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] R binaries, platform independent and Design of Experiments
Nam-Ky Nguyen wrote: Dear Rexpert, I would like to thank those who spend time answering my email on the burning of a CD with all R binary files for Windows and Linux. I have tried a couple of suggestions but have not been successful. I will pass these suggestions to our system administrator and I am sure that he can sort them out. I hope that the future version of R will be written in Java so that it is platform independent. This means there will be a single binary file for each new version of R. At the moment there are files for Windows, Mac OS, Fedora 1, 2, 3, 4, SUSE 9.1, 9.2, 9.3, etc. Honestly .. a) The sources are available and really easy to compile on all those operating systems. b) You do NOT want to do numerical computations on software available in Java byte code. I also hope that the future of version of R include more DOE (Design of Experiments) modules. R will be more useful if it is not only a language There are some packages availabe with tools for DOE, please check CRAN. Further contributions from users who like to do DOE (like you!) are welocme, of course! Uwe Ligges and environment for statistical computing and graphics, but also for design of experiments. I am toying with the idea of adding to R some modules of my Gendex DOE toolkit (http://designcomputing.net/gendex/). I learn from an Rexpert that the first step for this exercise is to convert my java code to C++. As I do not know C++ (and life is short) please let me know whether there is an alternative way without this conversion and whether you can actively help me in this exercise. Regards, __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
On Thu, 01 Sep 2005 08:25:14 -0400 Chuck Cleland wrote: Should the Value: section of the help page read: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL for a vector of mode integer. This statement is true, but less general than It is NULL or a vector of mode integer. hence the latter is surely preferred. Z NOTE: for not or in the second sentence. Uwe Ligges wrote: Christian Prinoth wrote: Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? No, because Z has no dim attribute. ?dim tells you: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL or a vector of mode integer. TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Using non-gcc compilers with install.packages()
On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO. Indeed, R is pretty sane. Fine tuning is conveniently carried out by editing the config.site file in the root source directory; LDFLAGS are on line 138 of the released 2.1.1 source. Which particular packages have you found showing this behaviour? Cheers, -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
Achim Zeileis wrote: On Thu, 01 Sep 2005 08:25:14 -0400 Chuck Cleland wrote: Should the Value: section of the help page read: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL for a vector of mode integer. This statement is true, but less general than It is NULL or a vector of mode integer. hence the latter is surely preferred. Z, in fact, it is not true: x - integer(1) dim(x) - 1 typeof(x) # integer dim(x)# 1 Best, Uwe Z NOTE: for not or in the second sentence. Uwe Ligges wrote: Christian Prinoth wrote: Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? No, because Z has no dim attribute. ?dim tells you: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL or a vector of mode integer. TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] source(file) = file becomes readonly
The OS is Windows XP. I use to work on the file while it's executed and save changes continually. It doesn't seem to have any effect on the current execution. I just find it annoying not to be able to do it. It's not crucial, but if there is some easy way around it I would like to know -Original Message- From: Uwe Ligges [mailto:[EMAIL PROTECTED] Sent: 1. september 2005 14:21 To: Hjellvik Vidar Cc: r-help@stat.math.ethz.ch Subject: Re: [R] source(file) = file becomes readonly Hjellvik Vidar wrote: Hello, when I work in R, I write code in a text file that I run with the source(filename) command. In R2.1.1 the file is read-only while the source command is executed. This was not the case in R2.0.1. Is this a bug-fix or is it possible not to have the file read-only when executed? So you want to modify a file *while* it is executed? Sounds dangerous to me, you may want to explain further... BTW: Which OS are we talking about? Uwe Ligges Best regards Vidar __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Using non-gcc compilers with install.packages()
Roger Bivand [EMAIL PROTECTED] writes: On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO. Indeed, R is pretty sane. Fine tuning is conveniently carried out by editing the config.site file in the root source directory; LDFLAGS are on line 138 of the released 2.1.1 source. Which particular packages have you found showing this behaviour? Hmm.. - The following use correct c/c++ compilers, but fail to recognize this as as Solaris system and uses -fPIC instead of -KPIC for shared objects. They also use other gcc-specific options like '-O2': RandomFields geoR geoRglm rgl - The following packages try g77 without first checking if it exists. I did not specify the F77 variable when compiling R, since it found f77 by itself. If all I need is to re-compile with the F77 variable set to 'f77', I won't mind. akima sm spatstat splancs There are problably more.. these two problem seem to be consistent across modules, but I can't be sure. Cheers, -- Trond Hasle Amundsen [EMAIL PROTECTED] Center for Information Technology Services, University of Oslo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] standard deviation in barplots
Sean Davis schrieb: I think barplot2 in the gregmisc (gplots) bundle will do that. Sean Ok thank´s but I've got an error and do not found the solution: ci.l [1] 304.09677 202.49907 0.0 63.14547 0.0 0.0 0.0 [8] 0.0 0.0 0.0 ci.h [1] 633.50323 426.10093 45.12493 344.85453 196.19980 198.17632 208.96365 [8] 76.49691 0.0 0.0 xrow [1] 468.8 314.3 20.1 204.0 96.0 96.0 115.0 36.0 0.0 0.0 barplot2(xrow,plot.ci=TRUE,ci.l=ci.l,ci.h=ci.h) Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Newbie help on dim
On Thu, 01 Sep 2005 14:44:53 +0200 Uwe Ligges wrote: Achim Zeileis wrote: On Thu, 01 Sep 2005 08:25:14 -0400 Chuck Cleland wrote: Should the Value: section of the help page read: For an array (and hence in particular, for a matrix) dim retrieves thedim attribute of the object. It is NULL for a vector of mode integer. This statement is true, but less general than It is NULL or a vector of mode integer. hence the latter is surely preferred. Z, in fact, it is not true: x - integer(1) dim(x) - 1 typeof(x) # integer dim(x)# 1 But then: is.vector(x) # FALSE but let's not start nitpicking here. Z Best, Uwe Z NOTE: for not or in the second sentence. Uwe Ligges wrote: Christian Prinoth wrote: Hi, if I do Z-rnorm(50) Followed by Dim(Z) I get NULL. Is this correct? Shouldn't I get 50 instead? No, because Z has no dim attribute. ?dim tells you: For an array (and hence in particular, for a matrix) dim retrieves the dim attribute of the object. It is NULL or a vector of mode integer. TIA Chris DISCLAIMER:\ L'utilizzo non autorizzato del presente messagg...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Yes, PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Spacing and margins in plot
If I use the following command to plot points: plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) there is a large amount of space between the label X Label and the actual x-axis. If I change the xaxt=n to xaxt=s, the label X Label don't move at all. Is there a way to get the label X Label closer to the x-axis when xaxt=n? The plot I am generating is going to be included in a paper I am writing. I can cause the plot to be saved in a PDF file by doing the following: pdf(foo.pdf, width=5.5, height=4.25, onefile=FALSE) plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) dev.off(); In the resulting file, there is a lot of whitespace around the graph, particularly between the top line of the plot area and the top of the page. Since I am including these plots in a paper, I want them to be as large as possible and not take up any extra space. Is there a way to get R to draw a plot that goes all the way to the margins of the print area? Jamie __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Multivariate Skew Normal distribution
Hi all, Could anyone tell me if there is any package (or function) that generates values from a multivariate skew normal distribution? Thanks all, Caio __ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] standard deviation in barplots
I forgot the error message ... Error in barplot2.default(xrow, plot.ci = TRUE, ci.l = ci.l, ci.h = ci.h) : confidence interval values are missing __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Using non-gcc compilers with install.packages()
On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Roger Bivand [EMAIL PROTECTED] writes: On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO. Indeed, R is pretty sane. Fine tuning is conveniently carried out by editing the config.site file in the root source directory; LDFLAGS are on line 138 of the released 2.1.1 source. Which particular packages have you found showing this behaviour? Hmm.. - The following use correct c/c++ compilers, but fail to recognize this as as Solaris system and uses -fPIC instead of -KPIC for shared objects. They also use other gcc-specific options like '-O2': RandomFields geoR geoRglm rgl - The following packages try g77 without first checking if it exists. I did not specify the F77 variable when compiling R, since it found f77 by itself. If all I need is to re-compile with the F77 variable set to 'f77', I won't mind. akima sm spatstat splancs There are problably more.. these two problem seem to be consistent across modules, but I can't be sure. OK. When installing packages, the settings in the R_HOME/etc/Makeconf file are used, unless over-ridden by a src/Makevars file in the source package. Since I maintain splancs, I know that it does not have a src/Makevars file. That means that you are getting the R_HOME/etc/Makeconf settings generated at compile time. Can you confirm that your R_HOME/etc/Makeconf file has the compile time settings? Cheers, -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] standard deviation in barplots
On Thu, 2005-09-01 at 15:00 +0200, Knut Krueger wrote: Sean Davis schrieb: I think barplot2 in the gregmisc (gplots) bundle will do that. Sean Ok thank´s but I've got an error and do not found the solution: ci.l [1] 304.09677 202.49907 0.0 63.14547 0.0 0.0 0.0 [8] 0.0 0.0 0.0 ci.h [1] 633.50323 426.10093 45.12493 344.85453 196.19980 198.17632 208.96365 [8] 76.49691 0.0 0.0 xrow [1] 468.8 314.3 20.1 204.0 96.0 96.0 115.0 36.0 0.0 0.0 barplot2(xrow,plot.ci=TRUE,ci.l=ci.l,ci.h=ci.h) Knut Presumably, you are getting: barplot2(xrow, plot.ci = TRUE, ci.l = ci.l, ci.h = ci.h) Error in barplot2.default(xrow, plot.ci = TRUE, ci.l = ci.l, ci.h = ci.h) : confidence interval values are missing There is an error in your function call. The argument 'ci.h' is incorrect, as it should be 'ci.u'. Thus, use: ci.l - c(304.09677, 202.49907, 0.0, 63.14547, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ci.u - c(633.50323, 426.10093, 45.12493, 344.85453, 196.19980, 198.17632, 208.96365, 76.49691, 0.0, 0.0) xrow - c(468.8, 314.3, 20.1, 204.0, 96.0, 96.0, 115.0, 36.0, 0.0, 0.0) barplot2(xrow, plot.ci = TRUE, ci.l = ci.l, ci.u = ci.u) HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Using non-gcc compilers with install.packages()
Trond Hasle Amundsen wrote: Roger Bivand [EMAIL PROTECTED] writes: On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO. Indeed, R is pretty sane. Fine tuning is conveniently carried out by editing the config.site file in the root source directory; LDFLAGS are on line 138 of the released 2.1.1 source. Which particular packages have you found showing this behaviour? Hmm.. - The following use correct c/c++ compilers, but fail to recognize this as as Solaris system and uses -fPIC instead of -KPIC for shared objects. They also use other gcc-specific options like '-O2': RandomFields geoR geoRglm rgl - The following packages try g77 without first checking if it exists. I did not specify the F77 variable when compiling R, since it found f77 by itself. If all I need is to re-compile with the F77 variable set to 'f77', I won't mind. akima sm spatstat splancs There are problably more.. these two problem seem to be consistent across modules, but I can't be sure. So these are package related problems. Can you please let the corresponding package authors know and ask them to fix their packages. Uwe Ligges Cheers, __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] default height width of graphs
hy all, When i plot under R it generates a 440x440px image, is it possible to modify and increase this ? thks all guillaume. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] standard deviation in barplots
Knut Krueger wrote: Sean Davis schrieb: I think barplot2 in the gregmisc (gplots) bundle will do that. Sean Ok thank´s but I've got an error and do not found the solution: ci.l [1] 304.09677 202.49907 0.0 63.14547 0.0 0.0 0.0 [8] 0.0 0.0 0.0 ci.h [1] 633.50323 426.10093 45.12493 344.85453 196.19980 198.17632 208.96365 [8] 76.49691 0.0 0.0 xrow [1] 468.8 314.3 20.1 204.0 96.0 96.0 115.0 36.0 0.0 0.0 barplot2(xrow,plot.ci=TRUE,ci.l=ci.l,ci.h=ci.h) It is called ci.u, not ci.h! Uwe Ligges Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] standard deviation in barplots
There is an error in your function call. The argument 'ci.h' is incorrect, as it should be 'ci.u'. Thus, use: ... I think I will need glasses Tank's a lot Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] default height width of graphs
[EMAIL PROTECTED] wrote: hy all, When i plot under R it generates a 440x440px image, is it possible to modify and increase this ? What device are we talking about? See the corresponding help file, maybe starting at ?Devices Uwe Ligges thks all guillaume. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in plot
Jamieson Cobleigh wrote: If I use the following command to plot points: plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) there is a large amount of space between the label X Label and the actual x-axis. If I change the xaxt=n to xaxt=s, the label X Label don't move at all. Is there a way to get the label X Label closer to the x-axis when xaxt=n? The plot I am generating is going to be included in a paper I am writing. I can cause the plot to be saved in a PDF file by doing the following: pdf(foo.pdf, width=5.5, height=4.25, onefile=FALSE) plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) dev.off(); In the resulting file, there is a lot of whitespace around the graph, particularly between the top line of the plot area and the top of the page. Since I am including these plots in a paper, I want them to be as large as possible and not take up any extra space. Is there a way to get R to draw a plot that goes all the way to the margins of the print area? Jamie For the size of margins see ?par and its argument mar, for the position of the x-axis label, add it in a separate call to title() and specify the line where to add the text as in: par(mar = c(1, 4, 0, 0) + 0.1) plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=, xaxt=n) title(xlab=X Label, line=0) Uwe Ligges __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Using non-gcc compilers with install.packages()
Roger Bivand [EMAIL PROTECTED] writes: On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Roger Bivand [EMAIL PROTECTED] writes: On Thu, 1 Sep 2005, Trond Hasle Amundsen wrote: Hi, I have built R 2.1.1 on Solaris and OSF1, and used the operating system's native compiler set. This worked fine. However, when I try using install.packages() it insists on using g77 etc., which doesn't exist on those systems. How can I specify which compilers to use? What about other compile-time options like LDFLAGS etc.? NB! Please include me in the CC list, since I'm not a mailinglist member. PS. I really like perl's approach to module building. When building perl modules, it defaults to the same compilers as perl was initially built with. This seems like a sane approach also for R IMHO. Indeed, R is pretty sane. Fine tuning is conveniently carried out by editing the config.site file in the root source directory; LDFLAGS are on line 138 of the released 2.1.1 source. Which particular packages have you found showing this behaviour? Hmm.. - The following use correct c/c++ compilers, but fail to recognize this as as Solaris system and uses -fPIC instead of -KPIC for shared objects. They also use other gcc-specific options like '-O2': RandomFields geoR geoRglm rgl - The following packages try g77 without first checking if it exists. I did not specify the F77 variable when compiling R, since it found f77 by itself. If all I need is to re-compile with the F77 variable set to 'f77', I won't mind. akima sm spatstat splancs There are problably more.. these two problem seem to be consistent across modules, but I can't be sure. OK. When installing packages, the settings in the R_HOME/etc/Makeconf file are used, unless over-ridden by a src/Makevars file in the source package. Since I maintain splancs, I know that it does not have a src/Makevars file. That means that you are getting the R_HOME/etc/Makeconf settings generated at compile time. Can you confirm that your R_HOME/etc/Makeconf file has the compile time settings? Aha. This explains everything. At our site, we use a software distribution and build system that classifies files a certain way. For text files, the Linux version is used, for no other reason than that the Linux compile server is the master of the cluster. This system does not recognize files that look different on different architectures. If it's a text file, it's considered architecture independent and only one version (in our case, the one built on Linux) is kept. I'll rebuild R on all architectures, and flag the contents of R_HOME/etc as architecture dependent so that the correct version is kept. That way, module building shouldn't give me more problems. Thanks for your quick and valuable input. You deserve a cold beer :) Cheers, -- Trond Hasle Amundsen [EMAIL PROTECTED] Gruppe for basis systemdrift (BSD), SAPP, USIT __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] 3d cube with labels along axes
Hi R-users, I would like to draw a cube with a grid on it and labels along all three axes. I have trouble printing the labels correctly. My best attempt is described below. Can somebody explain me how I can change the 0,20,40,80,100 along the x axis into character vectors like no, light, intermediate, severe ? x - seq(0, 100, length=10) #x - c(no, light, intermediate, severe) y - x f - function(x,y) { numeric(length=100) + 5 } z - outer(x, y, f) P - persp(x, y, z, theta=30, phi=30, zlim=c(-10,10), ticktype=detailed) text3d(0, 0, -10, Hello world, P) Thanks in advance, Jonne. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in plot
This technote explains the margin area (mar) and how to modify it to control white space around a graphic: http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm When you have multiple figures on a graphic, you may also want to learn to control the outer margin area (oma), which is also explained. AFAIK, the only way to get the axis label closer to the axis is to suppress the actual axis labels and use the mtext command to display alternative text where you want it. For example, look at the blue text in Figure 2B (at the above link) that is between the axis label and the axis. This blue text is at line=2, when the axis labels are at line=3. efg Bioinformatics Stowers Institute Jamieson Cobleigh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I use the following command to plot points: plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) there is a large amount of space between the label X Label and the actual x-axis. If I change the xaxt=n to xaxt=s, the label X Label don't move at all. Is there a way to get the label X Label closer to the x-axis when xaxt=n? The plot I am generating is going to be included in a paper I am writing. I can cause the plot to be saved in a PDF file by doing the following: pdf(foo.pdf, width=5.5, height=4.25, onefile=FALSE) plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) dev.off(); In the resulting file, there is a lot of whitespace around the graph, particularly between the top line of the plot area and the top of the page. Since I am including these plots in a paper, I want them to be as large as possible and not take up any extra space. Is there a way to get R to draw a plot that goes all the way to the margins of the print area? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Statistics with R
Hi Vincent, I regularly have a look at your web site. Very big thanks and bravo for this very useful work. (Just a little remark, why not let the french html version fully available on line, (findable by google, etc) This would/could be useful to promote R for french peoples ?) Many thanks. Vincent __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in plot
That worked and gave me enough information so to make it look exactly the way I want. Thanks! Jamie On 9/1/05, Chuck Cleland [EMAIL PROTECTED] wrote: How about this: par(mar=c(2,4,1,1)) plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=, xaxt=n) mtext(side=1, line=0.5, X Label) hope it helps, Chuck Jamieson Cobleigh wrote: If I use the following command to plot points: plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) there is a large amount of space between the label X Label and the actual x-axis. If I change the xaxt=n to xaxt=s, the label X Label don't move at all. Is there a way to get the label X Label closer to the x-axis when xaxt=n? The plot I am generating is going to be included in a paper I am writing. I can cause the plot to be saved in a PDF file by doing the following: pdf(foo.pdf, width=5.5, height=4.25, onefile=FALSE) plot(c(1,2,2,3,3,3), type=p, pch=20, ylab=Y Label, xlab=X Label, xaxt=n) dev.off(); In the resulting file, there is a lot of whitespace around the graph, particularly between the top line of the plot area and the top of the page. Since I am including these plots in a paper, I want them to be as large as possible and not take up any extra space. Is there a way to get R to draw a plot that goes all the way to the margins of the print area? Jamie __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Spacing and margins in lattice...
Similar to my last question, I want to tighten up the spacing and margins in a plot I am doing with lattice. Here are the commands I'm using: data - data.frame(x=c(1:3, 1:3), y=c(1:3, 1:3*2), cat=c(foo,foo,foo,bar, bar,bar)) xyplot(panel=panel.superpose, y~x, data=data, groups=cat, type=b, scales=list(tck=c(2,0), axs=r, cex=c(1,0))) I know that par(mar=c(2,2,1,1)) would do what I want with plot. Is there something similar for xyplot/lattice that can reduce the size of the margins of the plot? Thanks! Jamie __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in plot
Earl F. Glynn [EMAIL PROTECTED] writes: AFAIK, the only way to get the axis label closer to the axis is to suppress the actual axis labels and use the mtext command to display alternative text where you want it. For example, look at the blue text in Figure 2B (at the above link) that is between the axis label and the axis. This blue text is at line=2, when the axis labels are at line=3. how about plot(..., xlab=) title(xlab=label text, line=2) ? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] making self-starting function for nls
Hello. Following pages 342-347 of Pinheiro Bates, I am trying to write a self-starting nonlinear function (a non-rectagular hyperbola) to be used in nonlinear least squares regression (and eventually for a mixed model). When I use the getInitial function for my self-starting function I get the following error message: getInitial(photo~NRhyperbola(Irr,theta,Am,alpha,Rd),dat) Error in tapply(y, x, mean, na.rm = TRUE) : arguments must have same length Since I do not explicitly call tapply in my function that makes NRhyperbola a self-starting function (called NRhyperbolaInit, see below), I assume that the error is coming from within the mCall function but I can't figure out where or how. Would someone who has successfully done this be willing to look at my code and see where the problem arises? NRhyperbolaInit function(mCall,LHS,data) { xy-sortedXyData(mCall[[x]],LHS,data) if(nrow(xy)3){ stop(Too few unique irradiance values) } theta-0.75 Rd-min(xy[,y]) Am-max(xy[,y]) + abs(Rd) if(sum(xy[,x]50)3)alpha-coef(lm(y~x,data=xy,subset=x50))[2] if(sum(xy[,x]50)=3)alpha-0.07 value-c(theta,Am,alpha,Rd) names(value)-mCall[c(theta,Am,alpha,Rd)] value } Bill Shipley [EMAIL PROTECTED] http://callisto.si.usherb.ca:8080/bshipley/ http://callisto.si.usherb.ca:8080/bshipley/ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Matrices with a single column
Hi, I've got a quick question about what happens when indexing into matrices with a single column. I was wondering if anyone can help ... For example: x - matrix(1:10) y - cbind(x,x) x[4:6,] [1] 4 5 6 y[4:6,] [,1] [,2] [1,] 4 4 [2,] 5 5 [3,] 6 6 class(x[4:6,]) [1] integer class(y[4:6,]) [1] matrix It seems that R is returning the results of indexing into a matrix with one column as a vector rather than a matrix? Does anyone have a good way of preventing this from happening? cheers, crispin This email is confidential and intended solely for the use o...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Multivariate Skew Normal distribution
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Caio Lucidius Naberezny Azevedo Sent: 01 September 2005 12:09 To: Help mailing list - R Subject: [R] Multivariate Skew Normal distribution Hi all, Could anyone tell me if there is any package (or function) that generates values from a multivariate skew normal distribution? Thanks all, Caio Try RSiteSearch(multivariate normal skew) I tried and 39 messages turned up. R. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Matrices with a single column
There's an optional drop argument to the indexing operations, which is by default TRUE. You just want x[4:6,,drop=FALSE] [,1] [1,]4 [2,]5 [3,]6 Reid Huntsinger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Crispin Miller Sent: Thursday, September 01, 2005 10:54 AM To: R-help@stat.math.ethz.ch Subject: [R] Matrices with a single column Hi, I've got a quick question about what happens when indexing into matrices with a single column. I was wondering if anyone can help ... For example: x - matrix(1:10) y - cbind(x,x) x[4:6,] [1] 4 5 6 y[4:6,] [,1] [,2] [1,] 4 4 [2,] 5 5 [3,] 6 6 class(x[4:6,]) [1] integer class(y[4:6,]) [1] matrix It seems that R is returning the results of indexing into a matrix with one column as a vector rather than a matrix? Does anyone have a good way of preventing this from happening? cheers, crispin This email is confidential and intended solely for the use o...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Multivariate Skew Normal distribution
On 01-Sep-05 Caio Lucidius Naberezny Azevedo wrote: Hi all, Could anyone tell me if there is any package (or function) that generates values from a multivariate skew normal distribution? Thanks all, Caio Hello, Caio Please tell us what you mean by skew normal distribution. Since normal (i.e. gaussian) distributions are not skew, you presumably mean something different from what you said, so unless we understand this more clearly it is unlikely that anyone can make a suggestion which would meet your needs. With best wishes, Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 01-Sep-05 Time: 15:02:37 -- XFMail -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Matrices with a single column
Crispin Miller wrote: Hi, I've got a quick question about what happens when indexing into matrices with a single column. I was wondering if anyone can help ... For example: x - matrix(1:10) y - cbind(x,x) x[4:6,] [1] 4 5 6 y[4:6,] [,1] [,2] [1,] 4 4 [2,] 5 5 [3,] 6 6 class(x[4:6,]) [1] integer class(y[4:6,]) [1] matrix It seems that R is returning the results of indexing into a matrix with one column as a vector rather than a matrix? Does anyone have a good way of preventing this from happening? Yes, the argument drop: x[4:6,,drop=FALSE] Uwe Ligges cheers, crispin This email is confidential and intended solely for the use o...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in lattice...
Jamieson Cobleigh wrote: Similar to my last question, I want to tighten up the spacing and margins in a plot I am doing with lattice. Here are the commands I'm using: data - data.frame(x=c(1:3, 1:3), y=c(1:3, 1:3*2), cat=c(foo,foo,foo,bar, bar,bar)) xyplot(panel=panel.superpose, y~x, data=data, groups=cat, type=b, scales=list(tck=c(2,0), axs=r, cex=c(1,0))) I know that par(mar=c(2,2,1,1)) would do what I want with plot. Is there something similar for xyplot/lattice that can reduce the size of the margins of the plot? Thanks! Jamie Hi, Jamie, Will the following work for you? library(lattice) data - data.frame(x = c(1:3, 1:3), y = c(1:3, 1:3*2), cat = c(foo,foo,foo,bar, bar,bar)) trellis.par.set(theme = col.whitebg()) lw - list(left.padding = list(x = 0, units = inches)) lw$right.padding - list(x = -0.1, units = inches) lh - list(bottom.padding = list(x = 0, units = inches)) lh$top.padding - list(x = -0.2, units = inches) lattice.options(layout.widths = lw, layout.heights = lh) xyplot(y ~ x, data, groups = cat, type=b) HTH, --sundar __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Matrices with a single column
Thanks everyone! Crispin This email is confidential and intended solely for the use o...{{dropped}} __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in plot
Chris Wallace [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] how about plot(..., xlab=) title(xlab=label text, line=2) Yes, Chris, I like your idea, especially when I can fix both X and Y axes at the same time: plot(0, xlab=,ylab=) title(xlab=X axis, ylab=Y axis, line=2) I'd prefer a way to set the axis title line at the same time I change the mar parameters, but it's not a big deal. Thanks. efg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] making self-starting function for nls
On 9/1/05, Bill Shipley [EMAIL PROTECTED] wrote: Hello. Following pages 342-347 of Pinheiro Bates, I am trying to write a self-starting nonlinear function (a non-rectagular hyperbola) to be used in nonlinear least squares regression (and eventually for a mixed model). When I use the getInitial function for my self-starting function I get the following error message: getInitial(photo~NRhyperbola(Irr,theta,Am,alpha,Rd),dat) Error in tapply(y, x, mean, na.rm = TRUE) : arguments must have same length Since I do not explicitly call tapply in my function that makes NRhyperbola a self-starting function (called NRhyperbolaInit, see below), I assume that the error is coming from within the mCall function but I can't figure out where or how. My guess is that it is occuring in the call to sortedXyData but I won't be able to tell for sure without test data. One of the things that sortedXyData does is to average the y values for replicated x values. It seems that in the call the lengths of the x and y arguments are different. Would someone who has successfully done this be willing to look at my code and see where the problem arises? NRhyperbolaInit function(mCall,LHS,data) { xy-sortedXyData(mCall[[x]],LHS,data) if(nrow(xy)3){ stop(Too few unique irradiance values) } theta-0.75 Rd-min(xy[,y]) Am-max(xy[,y]) + abs(Rd) if(sum(xy[,x]50)3)alpha-coef(lm(y~x,data=xy,subset=x50))[2] if(sum(xy[,x]50)=3)alpha-0.07 value-c(theta,Am,alpha,Rd) names(value)-mCall[c(theta,Am,alpha,Rd)] value } Bill Shipley [EMAIL PROTECTED] http://callisto.si.usherb.ca:8080/bshipley/ http://callisto.si.usherb.ca:8080/bshipley/ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] VarCorr function for assigning random effects: was Question
On 9/1/05, Doran, Harold [EMAIL PROTECTED] wrote: If you are indeed using lme and not lmer then the needed function is VarCorr(). However, 2 recommendations. First, this is a busy list and better emails subject headers get better attention. Second, I would recommend using lmer as it is much faster. However, VarCorr seems to be incompatible with lmer and I do not know of another function to work with lmer. I hope that VarCorr is compatible with lmer. It is intended to be library(lme4) Loading required package: Matrix Loading required package: lattice example(VarCorr) VarCrr (fm2 - lmer(Reaction ~ Days + (1 | Subject) + (0 + Days | Subject), sleepstudy)) Linear mixed-effects model fit by REML Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject) Data: sleepstudy AIC BIClogLik MLdeviance REMLdeviance 1753.669 1769.634 -871.8346 1752.047 1743.669 Random effects: Groups NameVariance Std.Dev. Subject (Intercept) 627.571 25.0514 Subject Days 35.858 5.9881 Residual 653.584 25.5653 # of obs: 180, groups: Subject, 18; Subject, 18 Fixed effects: Estimate Std. Error DF t value Pr(|t|) (Intercept) 251.4051 6.8854 178 36.5128 2.2e-16 *** Days 10.4673 1.5596 178 6.7117 2.480e-10 *** --- Signif. codes: 0 $-1òø***òù 0.001 òø**òù 0.01 òø*òù 0.05 òø.òù 0.1 òø òù 1 VarCrr VarCorr(fm2) Groups NameVariance Std.Dev. Subject (Intercept) 627.571 25.0514 Subject Days 35.858 5.9881 Residual 653.584 25.5653 What may have occurred is that you had the nlme package loaded after the lme4 (actually the important package is Matrix which gets loaded by lme4) package was loaded. The VarCorr generic in nlme would mask the VarCorr generic in the Matrix package. Hence, a better email subject header will attract the attention of others *much* smarter than me! I hope this helps, Harold -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mahmoud Torabi Sent: Wednesday, August 31, 2005 9:51 PM To: R-help@stat.math.ethz.ch Cc: [EMAIL PROTECTED] Subject: [R] Question Dear Sir/Madam I would be pleased if anybody can help me. I'm using linear mixed model (lme) function.I'm doing some simulation in my research and need to be assigned variance components values during of my program. Specifically, when I use lme function, I can get some information by use summary() and I can assign some valuse like variance of fixed parameters and variance of random error term by using for example varFix and sigma.But I don't know how I can assign for variance of random effect. I know in SPLUS we have command var.ran, how about R ? The development version of the Matrix package, available at https://svn.r-project.org/R-packages/trunk/Matrix and soon to be Matrix_0.98-6 has a simulate method for lmer objects that may be of interest to you. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] post hoc analysis after anova
Dear list, This is a simple question but I spent an hour on it without success. So I sorry to bother you. I fit a linear model lm and then did anova. My idea is to run multiple pairwise comparision for several factor variables (f1, f2, f3, f4 each with its own levels, say 0, 1, 3 etc )at the same time and get statistics for each factor's levels. The statistics I want is just the basic one such as mean standard error. I tried the pairwise.t.test, but I could not do what I wnated to. I was wondering if anyone has idea about how I can accopmlish this task? Thanks a lot for your tips and help Greetings Mahdi -- --- Mahdi Osman (PhD) E-mail: [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] axis of plot
hy, I need to have the 0 on the bottom left corner of the graph being joined , not with this little hole between x axis and y axis... I've saw this question with the answer one time but i'm unable to find it again.. thks. guillaume __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] VarCorr function for assigning random effects: was Question
You are correct, VarCorr IS compatible with lmer. It must be what you state below. I should have saved the message but VarCorr() complained that I was not dealing with an lme() object. I had multiple packages (nlme, Matrix, mlmRev, among others) in the search path. On 9/1/05, Doran, Harold [EMAIL PROTECTED] wrote: If you are indeed using lme and not lmer then the needed function is VarCorr(). However, 2 recommendations. First, this is a busy list and better emails subject headers get better attention. Second, I would recommend using lmer as it is much faster. However, VarCorr seems to be incompatible with lmer and I do not know of another function to work with lmer. I hope that VarCorr is compatible with lmer. It is intended to be library(lme4) Loading required package: Matrix Loading required package: lattice example(VarCorr) VarCrr (fm2 - lmer(Reaction ~ Days + (1 | Subject) + (0 + Days | Subject), sleepstudy)) Linear mixed-effects model fit by REML Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject) Data: sleepstudy AIC BIClogLik MLdeviance REMLdeviance 1753.669 1769.634 -871.8346 1752.047 1743.669 Random effects: Groups NameVariance Std.Dev. Subject (Intercept) 627.571 25.0514 Subject Days 35.858 5.9881 Residual 653.584 25.5653 # of obs: 180, groups: Subject, 18; Subject, 18 Fixed effects: Estimate Std. Error DF t value Pr(|t|) (Intercept) 251.4051 6.8854 178 36.5128 2.2e-16 *** Days 10.4673 1.5596 178 6.7117 2.480e-10 *** --- Signif. codes: 0 $-1òø***òù 0.001 òø**òù 0.01 òø*òù 0.05 òø.òù 0.1 òø òù 1 VarCrr VarCorr(fm2) Groups NameVariance Std.Dev. Subject (Intercept) 627.571 25.0514 Subject Days 35.858 5.9881 Residual 653.584 25.5653 What may have occurred is that you had the nlme package loaded after the lme4 (actually the important package is Matrix which gets loaded by lme4) package was loaded. The VarCorr generic in nlme would mask the VarCorr generic in the Matrix package. Hence, a better email subject header will attract the attention of others *much* smarter than me! I hope this helps, Harold -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mahmoud Torabi Sent: Wednesday, August 31, 2005 9:51 PM To: R-help@stat.math.ethz.ch Cc: [EMAIL PROTECTED] Subject: [R] Question Dear Sir/Madam I would be pleased if anybody can help me. I'm using linear mixed model (lme) function.I'm doing some simulation in my research and need to be assigned variance components values during of my program. Specifically, when I use lme function, I can get some information by use summary() and I can assign some valuse like variance of fixed parameters and variance of random error term by using for example varFix and sigma.But I don't know how I can assign for variance of random effect. I know in SPLUS we have command var.ran, how about R ? The development version of the Matrix package, available at https://svn.r-project.org/R-packages/trunk/Matrix and soon to be Matrix_0.98-6 has a simulate method for lmer objects that may be of interest to you. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] axis of plot
On Thu, 2005-09-01 at 16:58 +0100, [EMAIL PROTECTED] wrote: hy, I need to have the 0 on the bottom left corner of the graph being joined , not with this little hole between x axis and y axis... I've saw this question with the answer one time but i'm unable to find it again.. thks. guillaume See 'xaxs' and 'yaxs' in ?par: plot(1:5, xaxs = i, yaxs = i, xlim = c(0, 5), ylim = c(0, 5)) By default, both are set to r, which adds +/- 4% to the range of each axis. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] controlling where *.Rout gets printed. Possible?
OK, my journey to make lab machines automagically install update all desirable R packages is nearing an end! The only question I have now is this: How can I control where the system prints the *.Rout file that is created automatically when the R batch program runs. In man R I don't find any information about it. When the cron job runs R_installAll.sh (see below), I'd like to re-direct it to someplace that ordinary users can read. Here's the shell script I will schedule with cron R_installAll.sh -- #!/bin/bash R CMD BATCH /usr/local/bin/R_installAll.R -- And here's the R program -R_installAll.R- # Paul Johnson pauljohn _AT_ ku.edu 2005-08-31 # This should update and then install all packages, except for # ones I exclude because they don't work or we don't want them. options(repos = http://lib.stat.cmu.edu/R/CRAN/;) update.packages(ask=F) theNew - new.packages() failPackages - c(BRugs,GDD,gtkDevice,gap,gnomeGUI,mimR,ncdf,pathmix,rcdd,rgdal,rpvm, Rmpi,RQuantLib,RMySQL, RNetCDF,RODBC,ROracle,RScaLAPACK,rsprng,RWinEdt,taskPR) shouldFail - theNew %in% failPackages install.packages( theNew[!shouldFail],dependencies=T) # VGAM is not in CRAN yet, but Zelig wants it. # install.packages(VGAM, CRAN=http://www.stat.auckland.ac.nz/~yee;); update.packages(CRAN=http://www.stat.auckland.ac.nz/~yee;) -- -- Paul E. Johnson email: [EMAIL PROTECTED] Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn 1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66044-3177 FAX: (785) 864-5700 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] access to on.exit expressions in parent frames?
In R, sys.on.exit() retrieves the expression stored for use by 'on.exit' in the function currently being evaluated. In S, you get the list of expressions for the current frame and its parents. Is there any way I can do the same in R? If not, can this be added? Maybe 'sys.on.exit' could take a frame number or environment as an argument. Jeff __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] controlling where *.Rout gets printed. Possible?
Paul Johnson wrote: OK, my journey to make lab machines automagically install update all desirable R packages is nearing an end! The only question I have now is this: How can I control where the system prints the *.Rout file that is created automatically when the R batch program runs. In man R I don't find any information about it. When the cron job runs R_installAll.sh (see below), I'd like to re-direct it to someplace that ordinary users can read. But you find help in R CMD BATCH --help which tells you: Usage: R CMD BATCH [options] infile [outfile] Hence simply call R by something like R CMD BATCH /usr/local/bin/R_installAll.R /path/to/R_installAll.Result Uwe Ligges Here's the shell script I will schedule with cron R_installAll.sh -- #!/bin/bash R CMD BATCH /usr/local/bin/R_installAll.R -- And here's the R program -R_installAll.R- # Paul Johnson pauljohn _AT_ ku.edu 2005-08-31 # This should update and then install all packages, except for # ones I exclude because they don't work or we don't want them. options(repos = http://lib.stat.cmu.edu/R/CRAN/;) update.packages(ask=F) theNew - new.packages() failPackages - c(BRugs,GDD,gtkDevice,gap,gnomeGUI,mimR,ncdf,pathmix,rcdd,rgdal,rpvm, Rmpi,RQuantLib,RMySQL, RNetCDF,RODBC,ROracle,RScaLAPACK,rsprng,RWinEdt,taskPR) shouldFail - theNew %in% failPackages install.packages( theNew[!shouldFail],dependencies=T) # VGAM is not in CRAN yet, but Zelig wants it. # install.packages(VGAM, CRAN=http://www.stat.auckland.ac.nz/~yee;); update.packages(CRAN=http://www.stat.auckland.ac.nz/~yee;) -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Spacing and margins in lattice...
That did the trick. Thanks! Jamie On 9/1/05, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: Jamieson Cobleigh wrote: Similar to my last question, I want to tighten up the spacing and margins in a plot I am doing with lattice. Here are the commands I'm using: data - data.frame(x=c(1:3, 1:3), y=c(1:3, 1:3*2), cat=c(foo,foo,foo,bar, bar,bar)) xyplot(panel=panel.superpose, y~x, data=data, groups=cat, type=b, scales=list(tck=c(2,0), axs=r, cex=c(1,0))) I know that par(mar=c(2,2,1,1)) would do what I want with plot. Is there something similar for xyplot/lattice that can reduce the size of the margins of the plot? Thanks! Jamie Hi, Jamie, Will the following work for you? library(lattice) data - data.frame(x = c(1:3, 1:3), y = c(1:3, 1:3*2), cat = c(foo,foo,foo,bar, bar,bar)) trellis.par.set(theme = col.whitebg()) lw - list(left.padding = list(x = 0, units = inches)) lw$right.padding - list(x = -0.1, units = inches) lh - list(bottom.padding = list(x = 0, units = inches)) lh$top.padding - list(x = -0.2, units = inches) lattice.options(layout.widths = lw, layout.heights = lh) xyplot(y ~ x, data, groups = cat, type=b) HTH, --sundar __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] SpatStat Kest - Error Message help
Hi I'm working with the function Kest in the package SpatStat (under LINUX with R 2.1.0). In order to evaluate the statistical significance of my point pattern I'm doing 999 Montecarlo replications. The script that use the Kest function runs OK for most of the different point patterns that I have but for a particular point pattern, which have only 17 points, it runs until the 34th iteration and then I receive this message: Error in [-(`*tmp*`, index, value = NULL) : incompatible types (1000) in subassignment type fix Execution halted Do you have any idea about what could be the cause of this ? Thanks in advance D. - Stay ahead of the information curve. Receive EDA news and jobs on your desktop daily. Subscribe today to the EDA CafeNews newsletter. [ http://www10.edacafe.com/nl/newsletter_subscribe.php ] It's informative and essential. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Strange build message: request help w/resolving
Greetings, I am attempting to build a R package, however the build fails and the following message is ouput: C:\ConstellaGroup\EPA\RAGG\packageR CMD BUILD --binary --force RAGG * checking for file 'RAGG/DESCRIPTION' ... OK * preparing 'RAGG': * checking DESCRIPTION meta-information ... ERROR Error in if (regexpr(dep_regexp, dep) == -1) { : missing value where TRUE/FALSE needed Execution halted The DESCRIPTION file is as follows: Package: RAGG Title: Aggregation Tool for CMAQ gridded model data Version: 1.5 Date: 2004-08-23 Author: Nathan Shackles [EMAIL PROTECTED], ported from SAS code written by Renee Jaramillo [EMAIL PROTECTED] Description: The RAGG package performs aggregation of gridded CMAQ model data. The pacakge reads event data from Models3 IO-API files and outputs the aggregated annual data in Models3 IO-API file(s). Aggegation came about as a means to provide CMAQ-based estimates of total annual deposition and average annual concentrations. CMAQ is an episodic model requiring detailed meteorological and emissions inputs. Because of the extensive inputs and the time required to run CMAQ, it would be cost-prohibitive to simulate an entire year to estimate annual quantities. Aggregation formulas group events into clusters with similar 850-mb windflow patters to create annual estimates. Maintainer: Nathan Shackles [EMAIL PROTECTED] Depends: Models3 License: GPL version 2 or newer Any help that can be provided is appreciated. Thank you, John Zajd [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Strange build message: request help w/resolving
Zajd, John wrote: Greetings, I am attempting to build a R package, however the build fails and the following message is ouput: C:\ConstellaGroup\EPA\RAGG\packageR CMD BUILD --binary --force RAGG * checking for file 'RAGG/DESCRIPTION' ... OK * preparing 'RAGG': * checking DESCRIPTION meta-information ... ERROR Error in if (regexpr(dep_regexp, dep) == -1) { : missing value where TRUE/FALSE needed Execution halted The DESCRIPTION file is as follows: Package: RAGG Title: Aggregation Tool for CMAQ gridded model data Version: 1.5 Date: 2004-08-23 Author: Nathan Shackles [EMAIL PROTECTED], ported from SAS code written by Renee Jaramillo [EMAIL PROTECTED] Description: The RAGG package performs aggregation of gridded CMAQ model data. The pacakge reads event data from Models3 IO-API files and outputs the aggregated annual data in Models3 IO-API file(s). Aggegation came about as a means to provide CMAQ-based estimates of total annual deposition and average annual concentrations. CMAQ is an episodic model requiring detailed meteorological and emissions inputs. Because of the extensive inputs and the time required to run CMAQ, it would be cost-prohibitive to simulate an entire year to estimate annual quantities. Aggregation formulas group events into clusters with similar 850-mb windflow patters to create annual estimates. Maintainer: Nathan Shackles [EMAIL PROTECTED] Depends: Models3 License: GPL version 2 or newer Any help that can be provided is appreciated. One obvious point: Continuation lines should begin with a white space (such as a tab). See the Writing R Extensions manual for more details. Uwe Ligges Thank you, John Zajd [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] label *on the side* in conditional lattice plots?
On 8/31/05, Maciej Kalisiak [EMAIL PROTECTED] wrote: I'm doing bwplot(x ~ y | z, ...) with lattice, but would like the z-labels to appear to the *side* of each bwplot, rather than on top... is this possible? Not currently (it's on my TODO list). Deepayan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Linux Standalone Server Suggestions for R
Most powerful in what way? Quite a lot depends on the jobs you're going to run. - To run CPU-bound jobs, more CPUs is better. (Even though R doesn't do threading, you can manually split some CPU-bound jobs in several parts and run them simultaneously.) Apart from multiple CPUs and hyperthreading, check the new dual-core CPUs. - To run very large jobs, more memory is better. You can easily spend most of your money on memory. Get the fastest one. - You should get 64-bit CPUs, otherwise you won't be able to run very large jobs (search the list for details). I would suggest that you buy a configuration that can handle more CPUs and memory than you think you need now (say, at least 4 max CPUs and 16 GB max memory), then keep on adding more memory and CPUs as your needs change. hth, b. -Original Message- From: Jia-Shing So [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 10:03 PM To: r-help@stat.math.ethz.ch Cc: Phuoc Hong Subject: [R] Linux Standalone Server Suggestions for R Hi All, My group is looking for any suggestions on what to purchase to achieve the most powerful number crunching system that $50k can buy. The main application that will be used is R so input on what hardware benefits R most will be appreciated. The requirements are that it be a single standalone server (i.e. not a cluster solution), and it that must be able to run unix/linux. If anyone has any experience/ suggestions regarding the following questions that would also be greatly appreciated. AMD vs Intel chips, especially 64-bit versions of the two? Using Itanium/Opterons and if so how much of a performance boost did you achieve vs other 64-bit chip sets? Also, does anyone know if there is an upper thresh hold on much memory R can use? Thanks in advance for any help and suggestions, Jia-Shing So Programmer Analyst Biostatistics and Bioinformatics Lab University of California, San Diego __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] png scaling problem
scaling-4 xywidth-480 resolution-150 png(filename = c:/r/anschluss/plots/4.png, width = xywidth*scaling, height = xywidth*scaling,pointsize = 12, bg = white, res = resolution*scaling) .. barplot(xrow,col = barcolors,cex.axis=scaling, ylab=mean time till attachment in sec,cex.lab=1.2*scaling) I tried to scale the barplot but there is one strange result: scaling=1 http://biostatistic.de/temp/1.png--- the ylab is ok scaling=2 http://biostatistic.de/temp/2.png--- the ylab is not ok scaling=4 http://biostatistic.de/temp/4.png--- the ylab is terrible is there any better solution to scale the resolution and the width/height? with regards Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
On Thu, 2005-09-01 at 21:51 +0200, Knut Krueger wrote: scaling-4 xywidth-480 resolution-150 png(filename = c:/r/anschluss/plots/4.png, width = xywidth*scaling, height = xywidth*scaling,pointsize = 12, bg = white, res = resolution*scaling) .. barplot(xrow,col = barcolors,cex.axis=scaling, ylab=mean time till attachment in sec,cex.lab=1.2*scaling) I tried to scale the barplot but there is one strange result: scaling=1 http://biostatistic.de/temp/1.png--- the ylab is ok scaling=2 http://biostatistic.de/temp/2.png--- the ylab is not ok scaling=4 http://biostatistic.de/temp/4.png--- the ylab is terrible is there any better solution to scale the resolution and the width/height? with regards Knut Probably a better first question is, why are you using a bitmapped graphics format if you need the image to be re-scaled? In general, bitmapped graphics do not resize well, though if you have a specific need and know a target image size, you can adjust various parameters to look decent. Are you going to view these images in a web browser, where you are concerned with display size and resolution? From your e-mail headers it appears you are on Windows. If you need a re-sizable graphic, use a vector based format such as wmf/emf, especially if you need the graphics embedded in a Windows application such as Word or Powerpoint. This is the default format under Windows when copying and pasting a graphic between applications. You can then, fairly freely, resize the image in the target application as you may require. If you are going to print the graphic directly or include it in a document for printing (as opposed to just viewing it), then use PDF or Postscript. The latter in EPS format, can be imported into many Windows applications like Word, including the generation of a preview image. However, they don't look good for direct use in presentations (unless you print to a PS file and then convert to PDF for viewing). See ?Devices for more information. With a better idea of how you plan to use the graphic(s), we can offer more specific recommendations on how to proceed. Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] transparency?
dear R wizards: I am getting to play more and more with fun fonts (irony warning). I now know that I can safely use my TeXtext encoding with the postscript device, but not with the pdf device. Unfortunately, I believe that the postscript device does not support translucent colors---or is there a version parameter (like the version=1.4 that I need with the pdf device) that would permit the use of translucent colors? Right now, it seems that my choice either TeX encoding or translucence? [there turns out to be another reason why I prefer the pdf to the postscript device. ps2pdf13 seems to lose the bounding box, at least sometimes. it seems to like to create one page and one page only.] And let me add---thank you very mcuh paul murrell and brian ripley for helping me figure out how to get the lucida fonts to work under R. highly appreciated. Regards, /iaw --- ivo welch Suggestion to the R graphics folks: * Why is R's default device pdf v1.1 ? this was Acrobat version 2.0, isn't it? we are now at version 7. wouldn't it be useful to make the default 1.4 at this point? acrobat version 5.0 would seem a reasonable default assumption these days. * There is a bug (R segfaults) when afm files are not found. * When something does not work, such as encoding that is not supported, it would be nice to print a warning. --- I should also email this to the ghostscript 7.07 folks. If there is no Fontmap, they silently replace fonts. It is wonderful that they do replace, but they should print a warning Font xyz not found, thus replacing it with Font abs. The lack of good errors made it doubly hard to figure out the workings, and without the help of the aforementioned two angels, I would not have had a chance to figure it out. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Request: in savePlot, type=eps
Platform: Windows R version: 2.1.1 This is a request that in the savePlot function, type=eps be included in the next release. This would be an alias for type=ps but with a different file extension. Rationale: The current version of R outputs excellent EPS files. It is strictly correct to call these Postscript files, as EPS is a subset of PS. However, on Windows, files are often distinguished by the file extension, and users may have different applications associated with the different extensions. It would be nice to be able to save EPS files with the EPS extension. I realize that this can be accomplished with file.rename(paste(fn,.ps,sep=), paste(fn,.eps,sep=)) but saving directly would be more convenient. Thanks for considering it. ...Mike Prager __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Linux Standalone Server Suggestions for R
Jia-Shing, I missed your original message, but would like to reiterate Bogdan's comments and suggestions. In a former life, a colleague of mine led the way for us to construct a small farm of Opteron servers that all had 2 AMD64 CPU's, SUSE Enterprise Server OS, and the ability to have up to 16GB RAM. We experimented with clustering them but that was not successful, and for practical purposes, not necessary. Penguin computing (http://www.penguincomputing.com) provided us very reliable products, solutions, and service, and I am sure there are other vendors just as capable. As Bogdan mentioned, search the r-help archives for various discussions on this over the past few years. With $50K US, you likely will come up more computing power than you can dream of (for now at least :-). That can get you multiple 16GB 2CPU machines, I believe. Good luck! Hope that helps, Bill --- Bill Pikounis, PhD Nonclinical Statistics Centocor, Inc. -Original Message- From: bogdan romocea [mailto:[EMAIL PROTECTED] Sent: Thursday, September 01, 2005 2:54 PM To: [EMAIL PROTECTED] Cc: R-help@stat.math.ethz.ch Subject: Re: [R] Linux Standalone Server Suggestions for R Most powerful in what way? Quite a lot depends on the jobs you're going to run. - To run CPU-bound jobs, more CPUs is better. (Even though R doesn't do threading, you can manually split some CPU-bound jobs in several parts and run them simultaneously.) Apart from multiple CPUs and hyperthreading, check the new dual-core CPUs. - To run very large jobs, more memory is better. You can easily spend most of your money on memory. Get the fastest one. - You should get 64-bit CPUs, otherwise you won't be able to run very large jobs (search the list for details). I would suggest that you buy a configuration that can handle more CPUs and memory than you think you need now (say, at least 4 max CPUs and 16 GB max memory), then keep on adding more memory and CPUs as your needs change. hth, b. -Original Message- From: Jia-Shing So [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 10:03 PM To: r-help@stat.math.ethz.ch Cc: Phuoc Hong Subject: [R] Linux Standalone Server Suggestions for R Hi All, My group is looking for any suggestions on what to purchase to achieve the most powerful number crunching system that $50k can buy. The main application that will be used is R so input on what hardware benefits R most will be appreciated. The requirements are that it be a single standalone server (i.e. not a cluster solution), and it that must be able to run unix/linux. If anyone has any experience/ suggestions regarding the following questions that would also be greatly appreciated. AMD vs Intel chips, especially 64-bit versions of the two? Using Itanium/Opterons and if so how much of a performance boost did you achieve vs other 64-bit chip sets? Also, does anyone know if there is an upper thresh hold on much memory R can use? Thanks in advance for any help and suggestions, Jia-Shing So Programmer Analyst Biostatistics and Bioinformatics Lab University of California, San Diego __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Need help understanding/resolving build error message
Can someone provide help to resolve this build failure? Thank you, John Zajd C:\ConstellaGroup\EPA\RAGG\packagercmd check RAGG * checking for working latex ... OK * using log directory 'C:/ConstellaGroup/EPA/RAGG/package/RAGG.Rcheck' * using R version 2.1.0, 2005-04-18 * checking for file 'RAGG/DESCRIPTION' ... OK * this is package 'RAGG' version '1.5' * checking if this is a source package ... OK installing R.css in C:/ConstellaGroup/EPA/RAGG/package/RAGG.Rcheck -- Making package RAGG adding build stamp to DESCRIPTION Error in if (regexpr(dep_regexp, dep) == -1) { : missing value where TRUE/FALSE needed Execution halted make[2]: *** [frontmatter] Error 1 make[1]: *** [all] Error 2 make: *** [pkg-RAGG] Error 2 *** Installation of RAGG failed *** Removing 'C:/ConstellaGroup/EPA/RAGG/package/RAGG.Rcheck/RAGG' ERROR Installation failed. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Multivariate Skew Normal distribution
On Thu, 1 Sep 2005 [EMAIL PROTECTED] wrote: On 01-Sep-05 Caio Lucidius Naberezny Azevedo wrote: Hi all, Could anyone tell me if there is any package (or function) that generates values from a multivariate skew normal distribution? Thanks all, Caio Hello, Caio Please tell us what you mean by skew normal distribution. Since normal (i.e. gaussian) distributions are not skew, you presumably mean something different from what you said, so unless we understand this more clearly it is unlikely that anyone can make a suggestion which would meet your needs. Actually Ted it is perfectly clear. There are modifications of the normal (more than one approach) which incorporate skewness. There is a very nice package by Azzellini called sn which deals with this and with the skew t. A different version of the skew t is given in the package skewt. This is univariate only. There also appear to be some skew normal and skew t tools in RMetrics (in FSeries and fPortfolio). What is not clear is why Caio keeps asking the same question when I emailed him the name of the package yesterday. David Scott _ David Scott Department of Statistics, Tamaki Campus The University of Auckland, PB 92019 AucklandNEW ZEALAND Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000 Email: [EMAIL PROTECTED] Graduate Officer, Department of Statistics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] More block diagonal matrix construction code
Folks: In answer to a query, Andy Liaw recently submitted some code to construct a block diagonal matrix. For what seemed a fairly straightforward task, the code seemed a little overweight to me (that's an American stock analyst's term, btw), so I came up with a slightly cleaner version (with help from Andy): bdiag-function(...){ mlist-list(...) ## handle case in which list of matrices is given if(length(mlist)==1)mlist-unlist(mlist,rec=FALSE) csdim-rbind(c(0,0),apply(sapply(mlist,dim),1,cumsum )) ret-array(0,dim=csdim[length(mlist)+1,]) add1-matrix(rep(1:0,2),nc=2) for(i in seq(along=mlist)){ indx-apply(csdim[i:(i+1),]+add1,2,function(x)x[1]:x[2]) ## non-square matrix if(is.null(dim(indx)))ret[indx[[1]],indx[[2]]]-mlist[[i]] ## square matrix else ret[indx[,1],indx[,2]]-mlist[[i]] } ret } I doubt that there's any noticeable practical performance difference, of course. The strategy is entirely basic: just get the right indices for replacement of the arguments into a matrix of 0's of the right dimensions. About the only thing to notice is that the apply() construction returns either a list or matrix depending on whether a matrix is square or not (a subtlety that tripped me up in my first version of this code). I would be pleased if this stimulated others to come up with cleverer/more elegant approaches that they would share, as it's the sort of thing that I'll learn from and find useful. Cheers to all, Bert Gunter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] =?gb2312?B?OdTCMTXI1cew16Ky4bPJzqpTT0hPyczO8c3408O7pyzSu8LJw+K30cn9vLbOqtX9yr274dSxLLKi
y8011Koh?= Date: Fri, 02 Sep 2005 08:24:49 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_001_0018_01C39816.2C871AA0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 This is a multi-part message in MIME format. --=_NextPart_001_0018_01C39816.2C871AA0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: base64 usPP+8+iITnUwjE1yNXHsNeisuGzyc6qU09IT8nMzvHN+NPDu6cs0rvCycPit9HJ/by2zqrV/cq9 u+HUsSyyosvNNdSqISC6z7eo0NTIz9akOrn6vNLQxc+isvrStbK/yM/WpNDtv8nX1rrFILumSUNQ sbgwNTAzODIwMbrFo6zD4rfRvNPI63K1xNeisuHN+Na3o7podHRwOi8vd3d3LjExMXN0LmNvbS9z b2hvL2luZGV4LmFzcD9pZD1nemdz --=_NextPart_001_0018_01C39816.2C871AA0 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w MC4yODAwLjE0NzYiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8 Qk9EWSBiZ0NvbG9yPSNmZmZmZmY+PEZPTlQgc2l6ZT0yPrrDz/vPoiE51MIxNcjVx7DXorLhs8nO qlNPSE/JzM7xzfjTw7unLNK7wsnD4rfRyf28ts6q1f3Kvbvh1LEssqLLzTXUqiEgus+3qNDUyM/W pDq5+rzS0MXPorL60rWyv8jP1qTQ7b/J19a6xSC7pklDULG4MDUwMzgyMDG6xaOsw+K30bzTyOty tcTXorLhzfjWt6O6aHR0cDovL3d3dy4xMTFzdC5jb20vc29oby9pbmRleC5hc3A/aWQ9Z3pnczwv Rk9OVD4NCjxESVY+PEZPTlQgc2l6ZT0yPjwvRk9OVD4mbmJzcDs8L0RJVj48L0JPRFk+PC9IVE1M Pg== --=_NextPart_001_0018_01C39816.2C871AA0-- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Pseudo-Voigt fit
I haven't seen a reply to this question, so I will attempt a few remarks in spite of some confusion about what you are asking. 1. The function to use for parameter estimation depends on ths structure of the data. My all-around preference for many purposes is for optim, but I've used nls, fitdistr (in the MASS package) and others in different circumstances. 2. If you are doing nonlinear estimation with, e.g., optim, I suggest you request hessian=TRUE. The eigenvalues of the hessian will tell you if it is ill conditioned. If it is, you might consider reparameterizing the model. 3. I try to avoid using reserved words like c. R can often determine what you want from the context, but there are exceptions. I try to avoid that problem by testing a name at a command prompt before I use it. If it returns, object not found, I'm fine; if not, I try something different. 4. Following the posting guide! http://www.R-project.org/posting-guide.html; can on average increase the likelihood that you will receive helpful suggestions quickly. (I've learned that people rarely respond to my incoherent screams; when they do, it's rarely helpful. I've reluctantly learned that there is often no substutute for reading the [EMAIL PROTECTED] manual.) I'd be shocked if this answered your question, but I hope it is helpful nonetheless. spencer graves [EMAIL PROTECTED] wrote: Hi, I am sorry for this question, but I am trying to speed up an application I will need to fit many x-y data sets (input from text files) to 4-parameter Pseudo-Voigt peak function. Until now I used SigmaPlot macro to do it (enclosed just in case...) peaksign(q) = if(total(q)q[1], 1, -1) xatymin(q,r) = xatymax(q,max(r)-r) [Parameters] a = if(peaksign(y)0, max(y), min(y)) ''Auto {{previous: 60.8286}} b = fwhm(x,abs(y))/2 ''Auto {{previous: 0.656637}} c = .5 ''Auto {{previous: 6.82973e-010}} x0 = if(peaksign(y)0, xatymax(x,y), xatymin(x,y)) ''Auto {{previous: 3.19308}} [Equation] f = a*(c*(1/(1+((x-x0)/b)^2))+(1-c)*exp(-0.5*((x-x0)/b)^2)) fit f to y (manageable for ~100), but it looks like the next project would need to process ~1000 member sets. I am not as familiar with R to find the right info (although I can use R in general). I am also nearly sure that there should be a solution to this task out there ready to be modified... Could you be so kind and direct me please to the right package or web-site with examples? Thank you very much Dr. Petr Pancoska Department of Pathology SUNY Stony Brook, NY 11794 phone: (631)-444-3030 ** This e- mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by e-mail and destroy all copies of the original. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Defining an ex-gaussian PDF
1. I just got 10 hits from 'RSiteSearch(convolution of exponential and normal)', at least two of which look like they might interest you. 2. I similarly got 27 hits from 'RSiteSearch(convolution distribution)', several of which mention the distr package, which you might find useful. 3. I doubt if this solves your problem, but I hope you find it useful. If you have other questions for this list, I encourage you to PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;. It can increase the chances that you will get a useful reply quickly. spencer graves Michael Kubovy wrote: How does one define PDFs as yet undefined in R, such as the ex- gaussian, the sum of two RVs, one exponential, one Gaussian? The PDF would then be the convolution of an exponential PDF, dexp(), and a normal, dnorm(). Kindly cc me in your reply to r-help. Thanks, _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400Charlottesville, VA 22904-4400 Parcels:Room 102Gilmer Hall McCormick RoadCharlottesville, VA 22903 Office:B011+1-434-982-4729 Lab:B019+1-434-982-4751 Fax:+1-434-982-4766 WWW:http://www.people.virginia.edu/~mk9y/ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com http://www.pdf.com Tel: 408-938-4420 Fax: 408-280-7915 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] partial association model
my last post was filtered,so I post it again with another title. If I do not make a mistake,the partial association model is an extension of log-linear model.I read a papers which gives an example of it.(Sloane and Morgan,1996,An Introduction to Categorical Data Analysis,Annual Review of Sociology.22:351-375) Can R fit such partial association model? ps:Another somewhat off-topic question.What's the motivations to use log-linear model?Or why use log-linear model?I learn the log-linear model butI still do not master the the advantage of the model.thank you! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] png scaling problem
Probably a better first question is, why are you using a bitmapped graphics format if you need the image to be re-scaled? I need a 1000 dpi tif file in a size of appr. 10 to 10 cm for applied animal behaviour science: http://authors.elsevier.com/GuideForAuthors.html?PubID=503301dc=GFA images to one of the following formats (Note the resolution requirements for line drawings, halftones, and line/halftone combinations given below.): EPS: Vector drawings. Embed the font or save the text as graphics. TIFF: Colour or greyscale photographs (halftones): always use a minimum of 300 dpi. TIFF: Bitmapped line drawings: use a minimum of 1000 dpi. TIFF: Combinations bitmapped line/half-tone (colour or greyscale): a minimum of 500 dpi is required. DOC, XLS or PPT: If your electronic artwork is created in any of these Microsoft Office applications please supply as is. I tired the Postscript file but the file is double heigh as width i do not know why. The problem was already discussed in the tread: [R] High resolution plots I have to send the images possibly yesterday and I am looking fo a suitable solution since two months now. I tired gsview with converting to all possible Tiff formats but the images appear not in color and in a strange black and white way Some readers are able to read it (Windows Image view) other not and I do not know which reader the journal will use :-( And the ylab is too small ... http://biostatistic.de/temp/1.tif http://biostatistic.de/temp/2.tif http://biostatistic.de/temp/3.tif http://biostatistic.de/temp/4.tif In general, bitmapped graphics do not resize well, though if you have a specific need and know a target image size, you can adjust various parameters to look decent. Are you going to view these images in a web browser, where you are concerned with display size and resolution? From your e-mail headers it appears you are on Windows. If you need a re-sizable graphic, use a vector based format such as wmf/emf, especially if you need the graphics embedded in a Windows application such as Word or Powerpoint. This is the default format under Windows when copying and pasting a graphic between applications. You can then, fairly freely, resize the image in the target application as you may require. If you are going to print the graphic directly or include it in a document for printing (as opposed to just viewing it), then use PDF or Postscript. Ok there is a second description for the file format :-( http://authors.elsevier.com/ArtworkInstructions.html?dc=AI2 there are pdf formats welcome but with defined conditions: Maybe anybody could give me a hint to get the files in the recommendet format. I will ask them immediately which whether the pdf is allowed or not, becaus they have two different instruction sites :-( Regards Knut __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html