Re: [R] predict.prcomp: 'newdata' does not have the correct number of columns

2008-05-18 Thread Prof Brian Ripley
This is not to do with 'wide' matrices' but to do with the lack of column names. There is a bug -- the definition of 'p' should have NROW and not NCOL. On Sun, 18 May 2008, Gad Abraham wrote: Hi, I'm doing PCA on wide matrices and I don't understand why calling predict.prcomp on it throws

[R] plot a function with a vector as argument

2008-05-18 Thread chaij
I tried to define a function using another function I defined before, and the previous function has a vector as an argument, when I tried to get the graph of the new function, there was something going wrong. Here is a simple example to explain how it happend: fr1 - function(x,y){ x^2+x*y+1 }

Re: [R] Question about graphical UI running R version 2.7.0 (2008-04-22) on Ubuntu Hardy Heron...

2008-05-18 Thread Stefan Grosse
Original Message Subject: Re: [R] Question about graphical UI running R version 2.7.0 (2008-04-22) on Ubuntu Hardy Heron... From: Scionforbai [EMAIL PROTECTED] To: Brian Lunergan [EMAIL PROTECTED] Date: 17.05.2008 23:07 Have a look at RKWard

Re: [R] predict.prcomp: 'newdata' does not have the correct number of columns

2008-05-18 Thread Gad Abraham
Prof Brian Ripley wrote: This is not to do with 'wide' matrices' but to do with the lack of column names. There is a bug -- the definition of 'p' should have NROW and not NCOL. On Sun, 18 May 2008, Gad Abraham wrote: I've submitted a bug report: predict.prcomp: wrong check for matrix

[R] plot(summary) within quantreg package

2008-05-18 Thread rocchini
Quantreg package allows to plot the summary of models derived by quantile regression at different taus. The plot shows the parameters variation by varying taus: intercept and slope (for a linear model). Together with these values even confidence intervals may be plotted, based on the threshold

Re: [R] reading and analyzing a text file

2008-05-18 Thread Philipp Pagel
ATF 1.0 205 Type=Mapix Results 2 DateTime=2008/05/15 11:05:38 ConfigFile= GalFile=Y:\experimental\090508\_v1.0.gal PixelSize=20 Wavelengths=635 532 ImageFiles=Y:\May_2008\B_1.0_090508\Images\B_1.0_090508_50.tif RatioFormulations=W1/W2 (635/532) FeatureType=Circular

Re: [R] plot a function with a vector as argument

2008-05-18 Thread jim holtman
In the call to the function 'fr1', the argument 'x' comes in as a vector and you get a vector result. Here is what it looks like: fr2(seq(0,1,.1)) [1] 1.00 1.31 1.64 1.99 2.36 2.75 3.16 3.59 4.04 4.51 5.00 because fr2 is sending a vector of length 10 to fr1 which will return a vector of

Re: [R] *apply function for arrays?

2008-05-18 Thread Uwe Ligges
Hesen Peng wrote: Hi all, I've recently been writing functions which may deal with very large arrays. And I hope to use *apply functions in the program so that the code may look nicer and the performance may be better in the following two situations. The first situation is: I'm having an

Re: [R] plot(summary) within quantreg package

2008-05-18 Thread Achim Zeileis
On Sun, 18 May 2008, [EMAIL PROTECTED] wrote: Quantreg package allows to plot the summary of models derived by quantile regression at different taus. The plot shows the parameters variation by varying taus: intercept and slope (for a linear model). Together with these values even confidence

[R] opening multiple connections at once

2008-05-18 Thread Matje van de Camp
Hi all, I'm new to R and I'm writing an R program that gets called on by a shell script. The shell script creates several directories with files, the names vary according to whatever I use as input to the shell script. I need to make connections to certain files in R (about 100 files in total). I

Re: [R] R 2.70 + ps2pdf14

2008-05-18 Thread ivo welch
thanks, berwin. yes, I meant ghostscript 8.62, of course. ps2pdf14 is the equivalent of a distiller and is needed to embed fonts. (R does not embed fonts itself afaik.) if someone knows another way to embed all the fonts, I would love to know so that I can avoid ps2pdf14 altogether (not just

[R] R is a virus, spyware or malware (gasp!)

2008-05-18 Thread Philippe Grosjean
After a search session in Google, I found this page: http://www.prevx.com/filenames/X1993788672854780728-0/RGUI.EXE.html which classifies Rgui.exe (clearly stated as R for Windows GUI front-end) in a database of virus, spyware and malware! No comments! Philippe Grosjean

Re: [R] R is a virus, spyware or malware (gasp!)

2008-05-18 Thread Ioannis Dimakos
Of course it's a virus. Once you catch the virus, you feel this rush, this fever to abandon all other statistical packages. On a more serious note, though, the size of the RGUI.exe file as reported in the webpage is not even near close to the actual size of the R distribution exe pack. I

[R] Figure environment and includegraphics options from Sweave

2008-05-18 Thread BXC (Bendix Carstensen)
Tha handy thinb about the fig=TRUE option in Sweave is that you do not have to bother about filenames and starting and stpping the device. I want the the resulting LaTeX to look as: \begin{Schunk} \begin{Sinput} x - seq(-2 * pi, 2 * pi, 0.1) plot(x, cos(x), type = l, lwd = 4) \end{Sinput}

Re: [R] Figure environment and includegraphics options from Sweave

2008-05-18 Thread Charilaos Skiadas
On May 18, 2008, at 10:41 AM, BXC (Bendix Carstensen) wrote: Tha handy thinb about the fig=TRUE option in Sweave is that you do not have to bother about filenames and starting and stpping the device. I want the the resulting LaTeX to look as: \begin{Schunk} \begin{Sinput} x - seq(-2 * pi, 2

Re: [R] opening multiple connections at once

2008-05-18 Thread Prof Brian Ripley
See ?file -- all you need to do is to call that on every file you want to open. There is a limit to the number of simultaneously open connections, but it is currently more than 100. You haven't told us your OS (as requested in the posting guide), and you may hit OS/process limits. You have

Re: [R] Figure environment and includegraphics options from Sweave

2008-05-18 Thread BXC (Bendix Carstensen)
Thanks a lot yuor advice works, here is an actually working example of an .rnw file, where the graphs are stuffed in a subfolder: \documentclass{article} \begin{document} \SweaveOpts{include=FALSE} This is an experiment with two plots. Here is the first: CHUNK1, fig=TRUE, echo=TRUE, eps=FALSE,

Re: [R] R 2.70 + ps2pdf14

2008-05-18 Thread George N. White III
On Sat, 17 May 2008, ivo welch wrote: dear R graphics experts---if anyone is running the combination of R 2.7.0 and ghostscript (2.62), could you please run the following and let me know if you get the same strange symbol size that I do, or if there is something weird on my system?regards,

Re: [R] R 2.70 + ps2pdf14

2008-05-18 Thread hadley wickham
if developers from the R graphics group are reading this, given that this strange output is not just my imagination, maybe it would be worthwhile to see if the R output pdf could be made more robust to avoid this feature. I stumbled onto it deep in a program, and spend an afternoon

Re: [R] autocorrelation error: cannot allocate vector of size 220979 Kb

2008-05-18 Thread J S
Thanks. Here are some information about my computer and file: Operating system: Windows 2000 RAM: 1.99 GB After I run the program: gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 468065 12.5 818163 21.9 818163 21.9 Vcells 1160828 8.9 46162021 352.2

[R] how can i superpose 2 graphs

2008-05-18 Thread hanen
Hio i tried to do this by: par(new=TRUE) but the result is one picture but y-axis has 2 différent graduations.how can i correct this?( i want one graduation on y axis). -- View this message in context: http://www.nabble.com/how-can-i-superpose-2--graphs-tp17305355p17305355.html Sent from the

Re: [R] how can i superpose 2 graphs

2008-05-18 Thread Dieter Menne
hanen hanen.mastouri at yahoo.fr writes: i tried to do this by: par(new=TRUE) but the result is one picture but y-axis has 2 différent graduations.how can i correct this?( i want one graduation on y axis). ?lines ?points Dieter __

[R] cor -1

2008-05-18 Thread Oliver Soong
I'm having what looks like a quantization problem with cor on R 2.7.0. I get warnings from cor.test because r -1. R session output is at the bottom. A simple fix would be to add the appropriate checks to the end of the internal cor code. Oliver x - c(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,

[R] two curves at one graph

2008-05-18 Thread hanen
i try to use par(new=TRUE) i get them at the same graph but the y_axis and x_axis are drowen with two unevenly graduations that graph become unreadable. -- View this message in context: http://www.nabble.com/two-curves-at-one-graph-tp17307590p17307590.html Sent from the R help mailing list

Re: [R] two curves at one graph

2008-05-18 Thread Rolf Turner
?lines ?points On 19/05/2008, at 8:44 AM, hanen wrote: i try to use par(new=TRUE) i get them at the same graph but the y_axis and x_axis are drowen with two unevenly graduations that graph become unreadable. -- View this message in context: http://www.nabble.com/two-curves-at-

Re: [R] two curves at one graph

2008-05-18 Thread jim holtman
plot(...) par(new=TRUE) plot(..., axes=FALSE, xlab='', ylab='') # prevent redraw of the axis axis(4) # add secondary y-axis on the right. On Sun, May 18, 2008 at 4:44 PM, hanen [EMAIL PROTECTED] wrote: i try to use par(new=TRUE) i get them at the same graph but the y_axis and x_axis are

Re: [R] R is a virus, spyware or malware (gasp!)

2008-05-18 Thread Peter Dalgaard
Ioannis Dimakos wrote: Of course it's a virus. Once you catch the virus, you feel this rush, this fever to abandon all other statistical packages. On a more serious note, though, the size of the RGUI.exe file as reported in the webpage is not even near close to the actual size of the R

[R] Opening more than 1 R console in Windows

2008-05-18 Thread Anh Tran
Hi all, I recently found out that R does not utilize fully the Duo Core capability when you only run one instance of R. I did some number crunching today and it seems that if I only open 1 R console, it uses 50% of my CPU (either 50-50 or 100-0 on 2 cores). Then, I open the second instance and

Re: [R] *apply function for arrays?

2008-05-18 Thread Hesen Peng
Hi, Thank you so much for the help. apply does work for the first situation. For the second situation, I'm currently using: temp.a-function(i,j){ return(G(M[i,],N[j,])) } temp.v-Vectorize(temp.a) result-outer(1:nrow(M),1:nrow(N),FUN=temp.v) And I wonder whether there are some other ways to

Re: [R] pch=. plots much faster

2008-05-18 Thread Charles Plessy
Le Tue, May 13, 2008 at 01:08:15PM +0100, Prof Brian Ripley a écrit : That is a function of your X setup. R does ask for backing store to be used, and so it seeems your setup is not doing so. Also, the type=cairo in X11() will repaint from a backing pixmap. Thanks for the answer. I have

[R] three-dimensional (volumetric) estimation from x,y,z points

2008-05-18 Thread milton ruser
Dear all, I have a set of x,y,z points obtained from a lizard species and now I would like to estimate the three-dimensional use of space for this species. I know that 2D area I can estimate using adehabitat packages, but I don´t know how to estimate the volumetric space. Any help are welcome.

[R] question for Logic Regression

2008-05-18 Thread coldeyes.Rhelp
Hi All: how to get the coefficient for logic regression using selection=2 ( fit multiple models) and type=3 ( logistic regression) for example i have a fit like below : fit-logreg(resp = model.dat[,21], bin=model.dat[, 2:18],sep=model.dat[,1] ,type=3,select=2,ntrees=2,nleaves=6

Re: [R] question for Logic Regression

2008-05-18 Thread Yasir Kaheil
try alltrees - predict(fit, model.dat2) # make sure response variable is not included in model.dat2 also to see the other attributes in fit, try: attributes(fit) thanks y coldeyes.Rhelp wrote: Hi All: how to get the coefficient for logic regression using selection=2 ( fit multiple

[R] Balasan: Re: State disabled to Normal menu

2008-05-18 Thread Handayani Situmorang
Thank you very much for your advice,Jhon. I'm just trying to write some code. The logic of my code is if Model menu have been hit then Evaluation menu will active. I build the menus by tkadd, and try to change the state by tkconfigure, but it didn't work. May be i must catch the ID or the