Re: [R] calling sweave function from latex

2003-01-28 Thread david . whiting
You say that you call R code embedded in your LaTeX document. I tend to think of it as LaTeX embedded in my R code. I think the answer to your question is 'no', but there might be ways to work around it. I use AUCTeX in emacs and can select a region of foo.sw and run latex on that. This works fi

Re: [R] How to run the simulations in the background

2003-01-28 Thread Hedderik van Rijn
I do the computational works usually in the Linux system. I want to know how to run the R simulation in the background. I went to the R-FAQ pages but i did not find it. [..] p.s.) Splus BATCH mysim.s out & is typed in case of Splus simulation. R's manual page (man R) gives the list of commands

[R] very large data set: min, max works but range fails

2003-01-28 Thread George Ostrouchov
I want to do a simple histogram for a very large data set. I traced the problem to the range() function and the storage.mode()<-"double" assignment. Below is a sequence that works for min() and max(), but fails for range(). > length(evap0) [1] 51812400 > mode(evap0)

[R] How to run the simulations in the background

2003-01-28 Thread Ilsung Chang
This is a graduate student in Texas A&M university. I do the computational works usually in the Linux system. I want to know how to run the R simulation in the background. I went to the R-FAQ pages but i did not find it. Thank you. p.s.) Splus BATCH mysim.s out & is typed in case of Splus simulati

[R] Finding inflexion points from data

2003-01-28 Thread Adaikalavan Ramasamy
Dear all, I have a measurements from an experiment. Graphically I can see there is one inflexion point but would like to automate this process accurately. I am wondering if someone had written such a code (which I think is similar to turnpoints() in library pastecs). Thank you. Regards, Adai. _

[R] calling sweave function from latex

2003-01-28 Thread Sam McClatchie
System info: Mandrake 9.0 R Version 1.6.1 ESS 5.1.21 Emacs 21.2.1 --- Colleagues I've been calling R-code embedded in my LaTex document using Sweave, but would like to make things more convenient. At present as I understand it you first process the R chunks of code using the Sw

RE: [R] Curve Fitting Question - Newbie

2003-01-28 Thread Simon Blomberg
One way would be to use the nls package: library(nls) foo.dat <- (0.83 * exp(-0.017 * 1:1000) + 0.5) + rnorm(1000,0,0.05) # your y values foo.dat <- data.frame(cbind(foo.dat, 0:999)) # create some x values in a data frame names(foo.dat) <- c("y", "x") # give them names model <- nls( y ~ N * exp(

RE: [R] Curve Fitting Question - Newbie

2003-01-28 Thread Liaw, Andy
If you don't need the parameters in the curve, it seems like library(modreg) lines(supsmu(1:1000, foo.dat), lwd=3) gives a very reasonable result. HTH, Andy > -Original Message- > From: C Grant [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 28, 2003 6:39 PM > To: [EMAIL PROTECTED]

Re: [R] dyn.load warning message in R1.6.2 on Windows XP

2003-01-28 Thread Peter Dalgaard BSA
"Prasad, Rajiv" <[EMAIL PROTECTED]> writes: > Hi folks: > > I used to load a DLL fine up until R 1.5.1. The same DLL dyn.loaded under R > 1.6.2 prints the following warning message: > > > dyn.load("C:/Rajiv/Bin/rpdate.dll") > Warning message: > DLL attempted to change FPU control word from 800

[R] Curve Fitting Question - Newbie

2003-01-28 Thread C Grant
Hello, I have what should be an easy question. I'm a new r user and making the transition from menus to the command line so as to do batch processing of tons of data. One of my data streams needs to be detrended. It's a vector of numbers that follows a negative exponential decay. I need to fit a cu

[R] Help to make a function

2003-01-28 Thread Ronaldo Reis Jr.
Hi all, I have a simple code to produce some populations graphics. 10: DIM X(71) 20: INPUT "r=";R 30: INPUT "k=";K 40: INPUT "P(0)=";P(0) 50: FOR T=0 TO 69 60: P(T+1) = P(T) + R*P(T) * (1-P(T)/K) 70: NEXT T 80: GRAPH 90: COLOR 0 100: LINE (0,0)-(0,220) 110: LINE (0,0)-(220,0) 120: LINE (0,K)-(220

Re: [R] random number generator?

2003-01-28 Thread A.J. Rossini
> "AL" == Andy Liaw writes: AL> Might I suggest taking a poll (even though unscientific) of how many people AL> will be affected by a change in default RNG? My totally arbitrary guess is AL> very few, if any. But they may tend to be important (i.e. those with large stat software

[R] dyn.load warning message in R1.6.2 on Windows XP

2003-01-28 Thread Prasad, Rajiv
Hi folks: I used to load a DLL fine up until R 1.5.1. The same DLL dyn.loaded under R 1.6.2 prints the following warning message: > dyn.load("C:/Rajiv/Bin/rpdate.dll") Warning message: DLL attempted to change FPU control word from 8001f to 9001f > Any indication as to what the warning means,

[R] Newbie graphics question

2003-01-28 Thread Russell Norvell
Greetings list- I am a newcomer to R and have tried to resolve my question with the manuals and the help archives to no avail, though some of this is simply a lack of familiarity with R and S (BTW I am using R 1.6.1, on Windows98 second edition 4.10.A). I am trying to create publication qual

RE: [R] random number generator?

2003-01-28 Thread Liaw, Andy
Might I suggest taking a poll (even though unscientific) of how many people will be affected by a change in default RNG? My totally arbitrary guess is very few, if any. If I'm not mistaken, Python had only recently changed the default RNG to Mersenne-Twister. If Python can do it, I should think

RE: [R] random number generator?

2003-01-28 Thread ripley
Can I suggest RNGkind("Mersenne-Twister", "Inversion") and especially the use of Inversion where tail behaviour of the normal is important. Were it not for concerns about reproducibility we would have switched to Inversion a while back. On Tue, 28 Jan 2003, Charles Annis, P.E. wrote: > > Ear

Re: [R] problem with srt vector in xyplot {lattice}

2003-01-28 Thread ripley
A bug. The engine should detect NAs, not leave it to vagaries of the drivers. The grid engine will soon. On Wed, 29 Jan 2003, Patrick Connolly wrote: > On Fri, 24-Jan-2003 at 01:23PM -0600, Deepayan Sarkar wrote: > > |> The srt vector has several NA's. x11() does not draw these, which may or

Re: [R] problem with srt vector in xyplot {lattice}

2003-01-28 Thread Patrick Connolly
On Fri, 24-Jan-2003 at 01:23PM -0600, Deepayan Sarkar wrote: |> On Friday 24 January 2003 10:54 am, Wolfram Fischer - Z/I/M wrote: |> > [ R 1.6.1 ] |> > |> > PROBLEM |> > The plot of the appended code does produce |> > a postscript file which is not interpretable |> > by gv under Linux

RE: [R] random number generator?

2003-01-28 Thread Charles Annis, P.E.
Earlier today I reported finding an unbalanced number of observations in the p=0.0001 tails of rnorm. Many thanks to Peter Dalgaard who suggested changing the normal.kind generator. Using RNGkind(kind = NULL, normal.kind ="Box-Muller") seems to have provided the remedy. For example: > obser

[R] [R]Good advices or books on estimating the SPE?

2003-01-28 Thread Feng Zhang
Dear R'ers I am trying to use some distribution to test the hypothesis on my prediction error. Given a large numbe of sample data with unknown distribution, I first find some funtion to make regression. Now for each new data point, I can calculate the prediction error xi. So how to represent the S

Re: [R] random number generator?

2003-01-28 Thread Thomas W Blackwell
Peter - Your message is cryptic. I've just re-read help("RNGkind") in R 1.6.1 (linux Redhat rpm) and it doesn't say anything I can see about "an unfortuante interaction between the two methods that are used for generating uniform and normal variables". Are you referring to a thread in R-help

Re: [R] gray color in trellis xyplot

2003-01-28 Thread Jason Turner
On Tue, Jan 28, 2003 at 10:00:48AM -0600, Douglas Bates wrote: > Luca De Benedictis <[EMAIL PROTECTED]> writes: ... > > Why dark gray was chosen as the default color? > > compatibility with the original trellis graphics implementation. FWIW, I find that for on-screen graph reading, the cyan on dar

Re: [R] random number generator?

2003-01-28 Thread Peter Dalgaard BSA
"Charles Annis, P.E." <[EMAIL PROTECTED]> writes: > Dear R-Aficionados: > > I realize that no random number generator is perfect, so what I report > below may be a result of that simple fact. However, if I have made an > error in my thinking I would greatly appreciate being corrected. > > I wis

[R] (off-topic) Mingwin and cygwin

2003-01-28 Thread kjetil brinchmann halvorsen
Hola! I am about to install a program on my windows XP computer which seems to require cygwin installed. Will it cause any problems to have both cygwin and mingwin installed, I need mingwin to compile R packages? Thanks, Kjetil Halvorsen __ [EMAIL

[R] random number generator?

2003-01-28 Thread Charles Annis, P.E.
Dear R-Aficionados: I realize that no random number generator is perfect, so what I report below may be a result of that simple fact. However, if I have made an error in my thinking I would greatly appreciate being corrected. I wish to illustrate the behavior of small samples (n=10) and so gener

Re: [R] getChannels(fig, "red")

2003-01-28 Thread Roger Bivand
On Tue, 28 Jan 2003, Francisco do Nascimento Junior wrote: > Hello, expeRts, > > I'm using the function getChannels for capture the matriz of R,G,B of a > figure. I think that its returns values between 0 and 255, but the matriz > contents values between 0 and 1. Somebody could explain me that va

Re: [R] Plot to postscript in function

2003-01-28 Thread Marco Albani
Thanks to Prof. Ripley, this version of the fucntion works as expected > BbEh.graphs2eps function(the.data){ #function to plot all sort of cohort information to #a single eps for storage and future printing or display pippo <- deparse(substitute(the.data)) thefile <- paste(c("../ed/",pippo,"/",

[R] getChannels(fig, "red")

2003-01-28 Thread Francisco do Nascimento Junior
Hello, expeRts, I'm using the function getChannels for capture the matriz of R,G,B of a figure. I think that its returns values between 0 and 255, but the matriz contents values between 0 and 1. Somebody could explain me that values are these, pls? Tks, Francisco.

Re: [R] Plot to postscript in function

2003-01-28 Thread ripley
You appear to be using lattice commands to plot on a postscript device: you should be using a trellis.device. Also, you do need to *print* lattice commands, and I guess you are not doing so in the custom commands which you are not showing us. Wre those calls to zyplot, they would not work unless

[R] Plot to postscript in function

2003-01-28 Thread Marco Albani
Hello, I am having problems with plotting to a postscript device within a function call. When I do the same thing line by line in the command line interface, I have no problems, but the function creates an empty postscript file. If I remove the dev.off() call at the end of the function, I get o

Re: [R] symbol ok colors?

2003-01-28 Thread John Fox
Dear Luis, At 04:23 PM 1/28/2003 +, Luis Silva wrote: Thanks to all! as.character solved my problem. And if I wanted different colors instead? The argument col is also vectorized, so something like plot( , col=class) will work if class consists of small intergers. Alternatively, use

Re: [R] symbol

2003-01-28 Thread Thomas Lumley
On Tue, 28 Jan 2003, Luis Silva wrote: > Ok, this works. But I have this problem. I have a loop to make > each plot. Like this: > > plot(class 1, pch='1',...) > for j (in 2:n) > points(class 2, pch='j',...) > ... > > of course pch='j' doesn't work. It generates other symbols. I > accept also diffe

[R] symbol ok colors?

2003-01-28 Thread Luis Silva
Thanks to all! as.character solved my problem. And if I wanted different colors instead? Luis -- Kit SAPO.ADSL.PT Apenas 50 €. Adira já em http://www.sapo.pt/kitadsl __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] symbol

2003-01-28 Thread Sundar Dorai-Raj
Sorry, misread the question... Sundar Dorai-Raj wrote: use text instead: plot(x, y, type = "n") text(x, y, labels = class.label) Regards, Sundar Luis Silva wrote: Ok, this works. But I have this problem. I have a loop to make each plot. Like this: plot(class 1, pch='1',...) for j (in 2:n)

Re: [R] symbol

2003-01-28 Thread John Fox
Dear Luis, You can use the pch argument to plot; assuming that class is numeric and consists of single-digit integers, you could specify something like plot( , pch=as.character(class)). If class is a factor, you could substitute pch=as.character(as.numeric(type)). I hope that this helps,

Re: [R] symbol

2003-01-28 Thread Sundar Dorai-Raj
use text instead: plot(x, y, type = "n") text(x, y, labels = class.label) Regards, Sundar Luis Silva wrote: Ok, this works. But I have this problem. I have a loop to make each plot. Like this: plot(class 1, pch='1',...) for j (in 2:n) points(class 2, pch='j',...) ... of course pch='j' doesn'

[R] Help!!

2003-01-28 Thread Rabaie Remon
Dear R ers, if some can tel me how I can generate a sample from a given density. I have a complex 2D density function en I want to genearte a sample from it? Any package? Thank you Remon ,Utrecht _ Tired of spam? Get advanced j

Re: [R] symbol

2003-01-28 Thread Luis Silva
Ok, this works. But I have this problem. I have a loop to make each plot. Like this: plot(class 1, pch='1',...) for j (in 2:n) points(class 2, pch='j',...) ... of course pch='j' doesn't work. It generates other symbols. I accept also different colors instead of numbers } } try this: } } x<-

Re: [R] gray color in trellis xyplot

2003-01-28 Thread Douglas Bates
Luca De Benedictis <[EMAIL PROTECTED]> writes: > Dear all, > if gray is the background collor of a trellis xyplot (in the lattice > library) and I would like to switch to white, what I have to do? lset(col.whitebg()) > Why dark gray was chosen as the default color? compatibility with the origi

[R] symbol

2003-01-28 Thread Luis Silva
Dear R helpers I would like to make a plot where the symbols were the numbers of the corresponding classes, i.e, samples of class 1 would the symbol 1, samples of class 2 would have symbol 2, Is this possible? Thank you Luis -- Kit SAPO.ADSL.PT Apenas 50 €. Adira já em http://www.sapo.pt/

RE: [R] reading non-existent files

2003-01-28 Thread Christian . Stratowa
Dear All Thank you all for your fast help, the solutions that I have received are: file.exists() try() allFiles<-list.files(mydir) Best regards Christian Stratowa == Christian Stratowa, PhD Boehringer Ingelheim Austria Dept NCE Lead Discovery - Bioinfo

RE: [R] reading non-existent files

2003-01-28 Thread Marc Schwartz
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]] On Behalf Of >[EMAIL PROTECTED] >Sent: Tuesday, January 28, 2003 8:59 AM >To: [EMAIL PROTECTED] >Subject: [R] reading non-existent files > > >Dear R-experts > >I would like to read all files from a directory, the fil

Re: [R] reading non-existent files

2003-01-28 Thread ripley
On Tue, 28 Jan 2003 [EMAIL PROTECTED] wrote: > I would like to read all files from a directory, the files have names > "myname0001.txt" etc. I paste the directory plus file names and > use "read.delim()". > My problem is that some file names are missing, so I get an error > and my program stops.

RE: [R] reading non-existent files

2003-01-28 Thread Jesus Frias
Hi Christian, I suppose that you are doing this in a loop and is stopping. Have a look at the function try() ?try Try an Expression Allowing Error Recovery. Description: `try' is a wrapper to run an expression that might fail and allow the user's code to handle error

RE: [R] reading non-existent files

2003-01-28 Thread Christian . Stratowa
Great, thank you for the fast reply Regards Christian Stratowa == Christian Stratowa, PhD Boehringer Ingelheim Austria Dept NCE Lead Discovery - Bioinformatics Dr. Boehringergasse 5-11 A-1121 Vienna, Austria Tel.: ++43-1-80105-2470 Fax: ++43-1-80105-268

Re: [R] reading non-existent files

2003-01-28 Thread Ben Bolker
?file.exists On Tue, 28 Jan 2003 [EMAIL PROTECTED] wrote: > Dear R-experts > > I would like to read all files from a directory, the files have names > "myname0001.txt" etc. I paste the directory plus file names and > use "read.delim()". > My problem is that some file names are missing, so I g

[R] reading non-existent files

2003-01-28 Thread Christian . Stratowa
Dear R-experts I would like to read all files from a directory, the files have names "myname0001.txt" etc. I paste the directory plus file names and use "read.delim()". My problem is that some file names are missing, so I get an error and my program stops. Is there a way to check for a null pointe

[R] gray color in trellis xyplot

2003-01-28 Thread Luca De Benedictis
Dear all, if gray is the background collor of a trellis xyplot (in the lattice library) and I would like to switch to white, what I have to do? Why dark gray was chosen as the default color? Many thanks for the help. Luca __ [EMAIL PROTECTED] mailing li

Re: [R] iterative proportional fitting in R?

2003-01-28 Thread Michal Bojanowski
Hello nels.tomlinson, Tuesday, January 28, 2003, 1:03:12 AM, you wrote: nt1> Is there some package in R which does this adjustment, by any means? I guess you could do it via loglinear model: Look at ?loglin in base package as well as ?loglm in MASS package for formula interface to loglin(). I

[R] memory problems

2003-01-28 Thread Alex R. Kraaijeveld
Hi all New to R, and to this list, so this may be an old (and hopefully simple to solve!) problem. When running an aov analysis, after fitting two-way interactions, I get an error message saying 'can not allocate vector of 8515Kb'. Often other programs are then kicked out of memory or the whol

Re: [R] Error from StructTS: Solved

2003-01-28 Thread Susana Barbosa
Problem solved. Thank you! Susana (sorry for double posting) :-) > Your series is made up of integers, not doubles. Try > > > storage.mode(ts1) <- "double" > > and it will work. I don't think anything has changed here since 1.5.0. > __ [EMAIL PROT

Re: [R] Error from StructTS: solved

2003-01-28 Thread Susana Barbosa
> Your series is made up of integers, not doubles. Try > > > storage.mode(ts1) <- "double" > > and it will work. I don't think anything has changed here since 1.5.0. > __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/

Re: [R] Error from StructTS

2003-01-28 Thread ripley
Your series is made up of integers, not doubles. Try > storage.mode(ts1) <- "double" and it will work. I don't think anything has changed here since 1.5.0. On Tue, 28 Jan 2003, Susana Barbosa wrote: > > Thank you for your reply. > I am sending a sample time series (not too long I hope!). >

Re: [R] google

2003-01-28 Thread Duncan Murdoch
On Mon, 27 Jan 2003 18:35:31 -0500, you wrote: >W takes to White House :) > >No I din't try others. W is my daughter's favorite letter! C takes you to CNET, not to that other one letter language. So now it's official: R is more popular than C! :-) Duncan Murdoch __

Re: [R] Irregular time series

2003-01-28 Thread Peter Dalgaard BSA
Damon Wischik <[EMAIL PROTECTED]> writes: > > My dataset represents a point arrival process, not a sample of a > continuous process; I want to turn the continuous-time point arrival > process into a discrete-time point arrival process. I am looking for a > function which has the same effect as, b

Re: [R] Error from StructTS

2003-01-28 Thread Susana Barbosa
Thank you for your reply. I am sending a sample time series (not too long I hope!). With the input: load("ts1") StructTS(ts1, type="BSM") I get the following error: Error in KalmanLike2(y, Z, -1) : invalid argument type Thank you! Susana Barbosa (R installed from rpm - Linux Mandrake 9.0) De

RE: [R] Irregular time series

2003-01-28 Thread Damon Wischik
>> I have an irregular time series, stored as a data frame, in the form >> Time Bytes >> 57213.191 20 >> 57213.193 20 >> 57213.300 23 >>... ... >> How should I convert this into a regularly-spaced time series? >> I have in mind to divide time into equal-sized intervals,

Re: [R] Error from StructTS

2003-01-28 Thread ripley
On Tue, 28 Jan 2003, Susana Barbosa wrote: > I used function StructTS some time ago to fit a structural model to a time > series. > > Now with R 1.6.2-1 I repeated the analysis with the same series and I get the > following error: > > Error in KalmanLike2(y, Z, -1) : invalid argument type >

[R] Error from StructTS

2003-01-28 Thread Susana Barbosa
Hi, I used function StructTS some time ago to fit a structural model to a time series. Now with R 1.6.2-1 I repeated the analysis with the same series and I get the following error: Error in KalmanLike2(y, Z, -1) : invalid argument type I tried with other series and I get the same error; I

RE: [R] Irregular time series

2003-01-28 Thread Philippe Grosjean
You will find all required tools in the PASTECS library, including regul.screen() and regul.adj() to determine best time step in the regular series (with a maximum number of observations matching those in the initial irregular series), and four different regulation methods: regconst(), reglin(), re

[R] [off] Statistical list

2003-01-28 Thread E. Corda
Ronaldo, Do you know allstat? This is a statistical list where you receive informations about seminars, workshops, jobs, courses, and you can also ask statistical questions. See http://www.jiscmail.ac.uk/ On this site you will find other lists which might interest you. Best wishes, Eve > >Hi al

Re: [R] [R]: Trellis plot

2003-01-28 Thread E. Corda
Hello everybody, I have found the solution to my problem. Instead of writing > plot(mydata, outer = ~ treatment) I should write > plot(mydata, outer = ~ mydata$treatment) >"E. Corda" <[EMAIL PROTECTED]> writes: > >> I would be grateful if anyone could help me with the following. I am using >>