Re: [R] Making TIFF images with rtiff
How about dev.off() after your plot! It is easy as you predicted :-) Janusz. Inman, Brant A. M.D. wrote: Thank you Peter Dalgaard. When I open a DOS box and type gswin32c, I do indeed get an error message saying that it can't find the program. I edited the Windows system environmental variable Path and the user environmental variable PATH (wasn't sure which to edit), to contain the follwing after a semicolon C:\Program Files\gs\gs8.54\bin\. This effectively fixed the Dos box problem. I now get a GS prompt when I type gswin32c. When I restart R and use the following code, I no longer get an error message. attach(cars) bitmap(file='C:\\Documents and Settings\\m007704\\Desktop\\test.tif', + type = tifflzw, res = 1200) plot(speed ~ dist) Alas, if it was only that easy! When I look on my desktop (to which the file address above correctly refers to), there is no image file of any sort to be found. Any ideas as to what I am doing wrong? Brant Inman - It needs to be in your Path. If you open up a DOS box and type gswin32c, I bet you get the same error message. You can fix this by editing the Path (via My Computer/Properties/Advanced/Environment variables, as you seem to know). If you use the R_GSCMD route, you may get in trouble with the embedded space in Program Files (dir/x c: will tell you the equivalent space-free name). Also, remember that environment changes do not affect running programs so you may need to exit R and restart. __ 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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Autoregressive Model with Independent Variable
It looks like just simple ARMA model; there is no visible I-part in Jarrett's specification. Unless it's hidden in the '...' part :) Janusz. On Wed, 1 Mar 2006, Dirk Eddelbuettel wrote: On 1 March 2006 at 20:06, Jarrett Byrnes wrote: | Hey, all, I may just be missing something, but I'm trying to construct | a temporal autoregression with an independant variable other than just | what is happened at a previous point in time. So, the model structure | would be something like | | y(t)=b0+b1*y(t-1)+b2*y(t-2)...+a*x(t) | | I'm even considering a model of | | y(t)=b0+b1*y(t-1)+b2*y(t-2)...+a1*x(t)+a2*x(t-1)... | | So, my data looks like | | Timey x | 1 4 6 | 2 5 10 | 3 10 1 | etc. | | When looking at ar() and similar methods, however, it seemed that the | input was a single vector - say, in this case, the value y. Is there a | method that allows me to specify an explicit model that would then | incorporate x? Yes: arima(), see in particular the xreg argument. Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison __ 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] Gram-Charlier series
I believe this page includes more up to date version: http://fisher.utstat.toronto.edu/david/Sym2004/Sym2004.html Janusz. On Wed, 22 Feb 2006, Ernst Hansen wrote: Martin Maechler writes: AugS == [EMAIL PROTECTED] on Wed, 22 Feb 2006 17:13:17 +1100 writes: AugS Good day everyone, AugS I want to use the Gram-Charlier series expansion to model AugS some data. To do that, I need functions to: AugS 1) Calculate 'n' moments from given data AugS 2) Transform 'n' moments to 'n' central moments, or AugS 3) Transform 'n' moments to 'n' cumulants AugS 4) Calculate a number of Hermite polynomials AugS Are there R-functions to do any of the above? I have functions to do 4). For a direct way to translate raw moments into cumulants, you may want to look at the methods from the book 'Symbolic Computation for Statistical Inference' by D. F. Andrews and J. E. Stafford. There is in fact an R-implementation of the methods available at http://fisher.utstat.toronto.edu/david/SCSI/RSCSI.html Hope this helps, Ernst Hansen Department of Statistics University of Copenhagen __ 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] LaTeX slide show (Was: Re: Taking code from packages)
Duncan, it seems that you did not update 'xcolor' package properly. That's where \rowcolors is defined. In some instances, especially under MikTeX, the automatic update fails to update xcolor.sty. So, I suggest you download the latest xcolor package from the same place as the beamer package and then manually run 'latex xcolor.ins' to regenerate xcolor.sty. Then move the *.def and *.sty file to the proper places to gain full compatibility. Janusz. ** Janusz Kawczak ** ** UNC at Charlotte, Department of Mathematics Statistics, Room 345B ** ** 9201 University City Blvd** ** Charlotte, NC, 28223-0001, U.S.A.** ** Tel.: (W) (704) 687-2566 Fax.: (704) 687-6415 ** All truth passes through three stages. First, it is ridiculed, second it is violently opposed, and third, it is accepted as self-evident. -- Arthur Schopenhauer On Sat, 14 Jan 2006, Duncan Murdoch wrote: On 1/14/2006 2:39 AM, Henrik Bengtsson wrote: Duncan Murdoch wrote: On 1/13/2006 2:04 AM, Ales Ziberna wrote: Hello! [snip] (I'm a little sensitive about dependencies now, since the LaTeX seminar template I've used a few times no longer works. It depends on too many LaTeX packages, and someone, somewhere has introduced incompatibilities in them. Seems like I'll be forced to use Powerpoint or Impress.) Try LaTeX Beamer! It is the best thing that happend to LaTeX in a long time. Simply beautiful, intuitive and very easy to use, and it's not yet another 'seminar' or 'prosper'. Part of MikTeX now. See http://latex-beamer.sourceforge.net/ for documentation, examples etc. Thanks to Henrik and Stephen Eglen for this suggestion. It does look nice (though the test presentation, beamerexample1.tex failed with ! Undefined control sequence. recently read \rowcolors l.937 \end{frame} indicating some version incompatibility with what I've got installed, the simpler examples all seem to work and do indeed give nice output.) 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] curve fit
There are infinitely (uncountably) many of them. Which one do you want? jk/ On Thu, 20 Oct 2005, Xiaodong Jin wrote: How to obtain the FUNCTION for the following smooth curve? x 0100 250 500 1000 4000 y 1.8 1.2 1.02 0.99 0.97 0.85 Thanks, SJ - [[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] eigenvalues of a circulant matrix
Again, what's your kinv? On Mon, 2 May 2005, Globe Trotter wrote: OK, lets redo this again, and ensure that we start with a row that will indeed lead to a symmetric matrix for the circulant matrix: x-scan(kinv) y-x[c(109:1,2:108)] X=toeplitz(y) Z=y for (i in 2:216) Z=rbind(Z,y[c((216-i+2):216,1:(216-i+1))]) range(X-Z) [1] 0 0 eigen(X) is the same as eigen(Z), but we know that Z is a circulant matrix so the eigenvectors are complex Any thoughts/screams? --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sun, 1 May 2005, someone who didn't give his name wrote: It is my understanding that the eigenvectors of a circulant matrix are given as follows: 1,omega,omega^2,,omega^{p-1} where the matrix has dimension given by p x p and omega is one of p complex roots of unity. (See Bellman for an excellent discussion on this). What is the relevance of this? Also, your reference is useless to us, which is important as this all hinges on your definitions. The matrix created by the attached row and obtained using the following commands indicates no imaginary parts for the eigenvectors. It appears that the real values are close, but not exactly so, and there is no imaginary part whatsoever. x-scan(kinv.dat) #length(x) = 216 y-x[c(109:216,1:108)] X-toeplitz(y) eigen(X)$vectors We don't have kinv.dat, but X is not circulant as usually defined. Note that the eigenvectors are correct, and they are indeed real, because X is symmetric. Is this a bug in R? Any insight if not, please! Well, first R calls LAPACK or EISPACK, so it would be a bug in one of those. But in so far as I understand you, X is a real symmetric matrix, and those have real eigenvalues and eigenvectors. I think you are confused about the meaning of Toeplitz and circulant. Compare http://mathworld.wolfram.com/CirculantMatrix.html http://mathworld.wolfram.com/ToeplitzMatrix.html and note that ?toeplitz says it computes the *symmetric* Toeplitz matrix. There is a very regretable tendency here for people to assume their lack of understanding is `a bug in R'. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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: Fwd: Re: [R] eigenvalues of a circulant matrix
I am not sure where your problem is, but I get these eigenvalues (no NaNs): eigen(X)$values [1] 33.6609067 33.6609067 33.3657337 33.3657337 33.1688489 33.1688489 [7] 32.9120603 32.9120603 32.6971529 32.6971529 32.4486757 32.4486757 [13] 32.2266513 32.2266513 31.9811880 31.9811880 31.7549774 31.7549774 [19] 31.5106802 31.5106802 31.2814636 31.2814636 31.0374623 31.0374623 [25] 30.8058168 30.8058168 30.5616180 30.5616180 30.3278637 30.3278637 [31] 30.0831665 30.0831665 29.8474910 29.8474910 29.6020821 29.6020821 [37] 29.3645937 29.3645937 29.1183207 29.1183207 28.8790883 28.8790883 [43] 28.6318199 28.6318199 28.3908814 28.3908814 28.1425171 28.1425171 [49] 27.8998862 27.8998862 27.6503394 27.6503394 27.4060152 27.4060152 [55] 27.1552045 27.1552045 26.9091770 26.9091770 26.6570228 26.6570228 [61] 26.4092748 26.4092748 26.1557083 26.1557083 25.9062128 25.9062128 [67] 25.6511554 25.6511554 25.3998797 25.3998797 25.1432660 25.1432660 [73] 24.8901666 24.8901666 24.6319253 24.6319253 24.3769595 24.3769595 [79] 24.1170167 24.1170167 23.8601266 23.8601266 23.5984086 23.5984086 [85] 23.3395425 23.3395425 23.0759756 23.0759756 22.8150622 22.8150622 [91] 22.5495580 22.5495580 22.2865330 22.2865330 22.0190111 22.0190111 [97] 21.7537982 21.7537982 21.4841613 21.4841613 21.2166787 21.2166787 [103] 20.9448339 20.9448339 20.6749916 20.6749916 20.4008361 20.4008361 [109] 20.1285318 20.1285318 19.8519563 19.8519563 19.5770843 19.5770843 [115] 19.2979657 19.2979657 19.0204113 19.0204113 18.7386197 18.7386197 [121] 18.4582550 18.4582550 18.1736507 18.1736507 17.8903299 17.8903299 [127] 17.6027615 17.6027615 17.3163357 17.3163357 17.0256338 17.0256338 [133] 16.7359239 16.7359239 16.4419046 16.4419046 16.1487284 16.1487284 [139] 15.8511833 15.8511833 15.5543204 15.5543204 15.2530227 15.2530227 [145] 14.9522432 14.9522432 14.6469402 14.6469402 14.3419740 14.3419740 [151] 14.0323742 14.0323742 13.7229182 13.7229182 13.4087011 13.4087011 [157] 13.0944062 13.0944062 12.7751956 12.7751956 12.4556716 12.4556716 [163] 12.1310382 12.1310382 11.8058191 11.8058191 11.4752626 11.4752626 [169] 11.1438118 11.1438118 10.8067417 10.8067417 10.4684198 10.4684198 [175] 10.1241331 10.1241331 9.7781642 9.7781642 9.4258124 9.4258124 [181] 9.0712521 9.0712521 8.7097773 8.7097773 8.3454594 8.3454594 [187] 7.9735359 7.9735359 7.5979459 7.5979459 7.2138560 7.2138560 [193] 6.8250204 6.8250204 6.4264559 6.4264559 6.0216592 6.0216592 [199] 5.6053886 5.6053886 5.1807131 5.1807131 4.7419171 4.7419171 [205] 4.2912801 4.2912801 3.8221094 3.8221094 3.3349406 3.3349406 [211] 2.8206308 2.8206308 2.2746353 2.2746353 1.6787279 1.6787279 [217] 0.9988213 Again, what is the issue here? Janusz. On Mon, 2 May 2005, Globe Trotter wrote: Looks like the files did not go through again. In any case, here is the kinv: please cut and paste and save to a file: -1.16801E-03 -2.24310E-03 -1.16864E-03 -2.24634E-03 -1.17143E-03 -2.25358E-03 -1.17589E-03 -2.26484E-03 -1.18271E-03 -2.27983E-03 -1.19124E-03 -2.29896E-03 -1.20164E-03 -2.32206E-03 -1.21442E-03 -2.34911E-03 -1.22939E-03 -2.38073E-03 -1.24626E-03 -2.41702E-03 -1.26596E-03 -2.45828E-03 -1.28801E-03 -2.50458E-03 -1.31296E-03 -2.55646E-03 -1.34048E-03 -2.61444E-03 -1.37127E-03 -2.67887E-03 -1.40531E-03 -2.75026E-03 -1.44311E-03 -2.82930E-03 -1.48481E-03 -2.91652E-03 -1.53081E-03 -3.01281E-03 -1.58131E-03 -3.11930E-03 -1.63727E-03 -3.23708E-03 -1.69907E-03 -3.36712E-03 -1.76720E-03 -3.51113E-03 -1.84251E-03 -3.67073E-03 -1.92580E-03 -3.84787E-03 -2.01834E-03 -4.04507E-03 -2.12087E-03 -4.26509E-03 -2.23531E-03 -4.51127E-03 -2.36357E-03 -4.78743E-03 -2.50664E-03 -5.09847E-03 -2.66813E-03 -5.45027E-03 -2.85019E-03 -5.84987E-03 -3.05664E-03 -6.30596E-03 -3.29224E-03 -6.82972E-03 -3.56187E-03 -7.43448E-03 -3.87322E-03 -8.13766E-03 -4.23449E-03 -8.96182E-03 -4.65684E-03 -9.93567E-03 -5.15519E-03 -1.10980E-02 -5.74887E-03 -1.25006E-02 -6.46346E-03 -1.42143E-02 -7.33466E-03 -1.63391E-02 -8.41211E-03 -1.90180E-02 -9.76709E-03 -2.24632E-02 -1.15055E-02 -2.70006E-02 -1.37894E-02 -3.31497E-02 -1.68780E-02 -4.17865E-02 -2.12092E-02 -5.44795E-02 -2.75722E-02 -7.42814E-02 -3.75180E-02 -0.107820 -5.44778E-02 -0.171908 -8.74660E-02 -0.320830 -0.167792 -0.826079 -0.486405 -6.28085 19.4495 -6.28085 -0.486405 -0.826079 -0.167792 -0.320830 -8.74660E-02 -0.171908 -5.44778E-02 -0.107820 -3.75180E-02 -7.42816E-02 -2.75722E-02 -5.44795E-02 -2.12092E-02 -4.17865E-02 -1.68780E-02 -3.31495E-02 -1.37894E-02 -2.70004E-02 -1.15055E-02 -2.24632E-02 -9.76708E-03 -1.90179E-02 -8.41210E-03 -1.63391E-02 -7.33465E-03 -1.42142E-02 -6.46346E-03 -1.25005E-02 -5.74887E-03
Re: Windows versus Unix packages in CRAN (Was Re: [R] Rmetrics)
And it seems that this vicious circle continues forever. Before posting these kind of messages can you please read the INSTRUCTIONS. fBasics_190.10051.zip is a COMPILED version of the package, not a source as you claim to be! It works with no problems; well, at least under Linux. Janusz. Richard A. O'Keefe wrote: Prof Brian Ripley [EMAIL PROTECTED] wrote: mkdir fBasics unzip fBasics.zip -d fBasics rm fBasics/src/*.o R CMD check fBasics and that took me about 3 minutes. Now me, I just did unzip -a fBasics_190.10051.zip R CMD INSTALL fBasics rm -rf fBasics in a naive and trusting manner. It took me considerably longer than 3 minutes to learn that this was what I should do, and when I did learn, I wondered if it's this simple, why can't R CMD INSTALL do it? Now I discover that it isn't that simple. The installation apparently went smoothly. This is R, right? Never occurred to me that there might be problems. Now, B-G--R! It turns out that core stuff is supplied as .dll files, which of course my UltraSPARC can do nothing with. The author of the Rmetrics code has a perfect right to provide his code in any form he wants under any conditions he wants (subject to GPL c). In particular, if he wants to provide a distribution which only works under Windows, that's perfectly OK. **BUT** when a distribution is peculiar to one operating system, that really should be highlighted in big bold letters: this is a WINDOWS BINARY version, so that people who can't use Windows .DLL files are spared a day of trying to figure out how to unpack and of doing an installation which reports no errors at all and of them finding that things do not work. There is *NOTHING* on http://www.itp.phys.ethz.ch/econophysics/R/download.htm that says Windows only. Click on I acceptand the page you arrive at has nothing in the text anywhere that says Windows only or what to do if not Windows. (The http://.../R/bin/windows/contrib/1.9 address of the page was, in retrospect, a big clue, sigh.) It would of course be nice if the developers had done R CMD check fBasics But if you go into the Sources directory, which I suppose you must have, for each of {fBasics,fExtremes,fOptions,fSeries} there is an xxx-00check.log.txt, so they _did_ run R CMD check. and sorted out the errors, then R CMD build fBasics Those same check logs show errors (like failure to build .dvi files). Will it work if I download the Sources packages? __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: Windows versus Unix packages in CRAN (Was Re: [R] Rmetrics)
Here is what I get: R : Copyright 2004, The R Foundation for Statistical Computing Version 1.9.0 (2004-04-12), ISBN 3-900051-00-3 . [Previously saved workspace restored] library(fBasics) --- fLibraries: A SOFTWARE COLLECTION FOR FINANCIAL ENGINEERS fBasics:Markets, Basic Statistics, Date and Time --- (there were no alterations done to the above output except where occurs!) You simply need to remove the stuff related to MS Win from zzz.R; in partricular the lines after if( ) to clear your message. As you can see, the info relates to the WinMenu under MS Win. Hope this helps. Janusz. On Fri, 21 May 2004, Andrew Criswell wrote: Hello all: On my linux platform, I ran the commands, mkdir fBasics unzip fBasics.zip -d fBasics rm fBasics/src/*.o R CMD check fBasics That was 3 minutes. Next, I copied the files contained in fBasics.Rcheck/fBasics to the R library. library(fBasics) fBasics:Markets, Basic Statistics, Date and TimeError in try(winMenuAdd(Rmetrics)) : couldn't find function winMenuAdd So, how do I get it to work with no problems in Linux?? Thanks, Andrew Janusz Kawczak wrote: And it seems that this vicious circle continues forever. Before posting these kind of messages can you please read the INSTRUCTIONS. fBasics_190.10051.zip is a COMPILED version of the package, not a source as you claim to be! It works with no problems; well, at least under Linux. Janusz. Richard A. O'Keefe wrote: Prof Brian Ripley [EMAIL PROTECTED] wrote: mkdir fBasics unzip fBasics.zip -d fBasics rm fBasics/src/*.o R CMD check fBasics and that took me about 3 minutes. Now me, I just did unzip -a fBasics_190.10051.zip R CMD INSTALL fBasics rm -rf fBasics in a naive and trusting manner. It took me considerably longer than 3 minutes to learn that this was what I should do, and when I did learn, I wondered if it's this simple, why can't R CMD INSTALL do it? Now I discover that it isn't that simple. The installation apparently went smoothly. This is R, right? Never occurred to me that there might be problems. Now, B-G--R! It turns out that core stuff is supplied as .dll files, which of course my UltraSPARC can do nothing with. The author of the Rmetrics code has a perfect right to provide his code in any form he wants under any conditions he wants (subject to GPL c). In particular, if he wants to provide a distribution which only works under Windows, that's perfectly OK. **BUT** when a distribution is peculiar to one operating system, that really should be highlighted in big bold letters: this is a WINDOWS BINARY version, so that people who can't use Windows .DLL files are spared a day of trying to figure out how to unpack and of doing an installation which reports no errors at all and of them finding that things do not work. There is *NOTHING* on http://www.itp.phys.ethz.ch/econophysics/R/download.htm that says Windows only. Click on I acceptand the page you arrive at has nothing in the text anywhere that says Windows only or what to do if not Windows. (The http://.../R/bin/windows/contrib/1.9 address of the page was, in retrospect, a big clue, sigh.) It would of course be nice if the developers had done R CMD check fBasics But if you go into the Sources directory, which I suppose you must have, for each of {fBasics,fExtremes,fOptions,fSeries} there is an xxx-00check.log.txt, so they _did_ run R CMD check. and sorted out the errors, then R CMD build fBasics Those same check logs show errors (like failure to build .dvi files). Will it work if I download the Sources packages? __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Solaris 2.9
I've compiled the 1.8.0 R on Solaris 2.9 and when trying to use plot command I get the Bus error and a core dump. Anybody experienced something like this? If yes, what should I patch? Janusz. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help