RE: [R] Retrieve ... argument values

2003-09-17 Thread Richard A. O'Keefe
Ben Bolker [EMAIL PROTECTED] wrote: Yes, although this becomes tedious if (e.g.) you have a function that calls two different functions, each of which has many arguments (e.g. plot() and barplot(); then you have to set up a whole lot of arguments that default

Re: [R] Date on x-axis of xyplot

2003-09-17 Thread Jason Turner
On Wed, 2003-09-17 at 17:29, Deepayan Sarkar wrote: On Tuesday 16 September 2003 23:51, Jason Turner wrote: ... the lack of POSIXct support in the lattice graphics axes has often caused me to think up new ways around the plot. Unless I'm missing an obvious way to apply that... Actually,

Re: [R] Date on x-axis of xyplot

2003-09-17 Thread Prof Brian Ripley
On Tue, 16 Sep 2003, Deepayan Sarkar wrote: Is the date class standard enough to warrant including a check for it in lattice ? I don't think so. The POSIX*t classes in R are the most standard, followed by the chron package and only then the date package. -- Brian D. Ripley,

Re: [R] can predict ignore rows with insufficient info

2003-09-17 Thread Prof Brian Ripley
On Tue, 16 Sep 2003, Peter Whiting wrote: On Tue, Sep 16, 2003 at 04:17:59PM -0400, Thomas W Blackwell wrote: Peter - Your subsequent email seems just right. You have to determine ahead of time which rows can be estimated. It seems that predict removes rows with insufficient

[R] Quiz {was Quit asking me ..}

2003-09-17 Thread Martin Maechler
Spencer == Spencer Graves [EMAIL PROTECTED] on Tue, 16 Sep 2003 19:54:22 -0700 writes: Spencer Consider Spencer Q - function(x)q(no) Spencer With R 1.7.1 under Windows, Q() caused R to close Spencer without asking for confirmation. This does not Spencer solve the

Re: [R] calculation of the p value in ks.test()

2003-09-17 Thread Uwe Ligges
Rajarshi Guha wrote: Hi, I'm working with the ks.test() function and I have also implemented the test using Conover as the reference. My D value matches that produced by R. However to calculate the p value I am using the code described in Numerical Recipes in C++ (2nd Ed.) pg 631. The p value

[R] Using POSIX?t rather than chron or date

2003-09-17 Thread Martin Maechler
BDR == Prof Brian Ripley [EMAIL PROTECTED] on Wed, 17 Sep 2003 06:58:48 +0100 (BST) writes: BDR On Tue, 16 Sep 2003, Deepayan Sarkar wrote: Is the date class standard enough to warrant including a check for it in lattice ? BDR I don't think so. The POSIX*t classes in R

Re: [R] Quiz {was Quit asking me ..}

2003-09-17 Thread Uwe Ligges
Martin Maechler wrote: Spencer == Spencer Graves [EMAIL PROTECTED] on Tue, 16 Sep 2003 19:54:22 -0700 writes: Spencer Consider Spencer Q - function(x)q(no) Spencer With R 1.7.1 under Windows, Q() caused R to close Spencer without asking for confirmation. This does not

Re: [R] Quiz {was Quit asking me ..}

2003-09-17 Thread Martin Maechler
MM == Martin Maechler [EMAIL PROTECTED] on Wed, 17 Sep 2003 08:36:19 +0200 writes: Spencer == Spencer Graves [EMAIL PROTECTED] on Tue, 16 Sep 2003 19:54:22 -0700 writes: Spencer Consider Spencer Q - function(x)q(no) Spencer With R 1.7.1 under Windows, Q() caused R to

Re: [R] Quiz {was Quit asking me ..}

2003-09-17 Thread Deepayan Sarkar
On Wednesday 17 September 2003 01:36, Martin Maechler wrote: How can you write (quite short!) R code such that typing Q -- without any () -- will quit R (without asking about saving). [But you shouldn't really keep that code active in your standard R session because it would be

RE: [R] Quiz {was Quit asking me ..}

2003-09-17 Thread Henrik Bengtsson
First, 42 characters... Q=no;class(Q)=Q;print.no=function(x)q(Q) Interestingly, the following works too (41 chars) Q=;class(Q)=Q;print.=function(x)q(no) Is it legal though to have empty class names? And finally, the beautiful one with 28 characters Q=no;class(Q)=Q;print.no=q Have nice day!

Re: [R] R-Golf {was Quiz {was Quit asking me ..}}

2003-09-17 Thread Barry Rowlingson
Deepayan Sarkar wrote: Barely, 46 removing all spaces: print.q-function(x)q(no);Q-1;class(Q)-q We can also replace - by = in recent (and _ in older) versions of R to decrease this further. This is 'R-golf'. Perl golf competitions are quite common and usually result in seriously obfuscated

RE: [R] Quiz {was Quit asking me ..}

2003-09-17 Thread Henrik Bengtsson
Sorry for bugging you AGAIN, but I went to get a coffee and I realized you can get down to 26 characters: class(Q)=Q=no;print.no=q That is a good question to put up on an R/parsing/S3/UseMethod quiz, ehe?! Henrik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

[R] attributing names in predicted type=terms gam object

2003-09-17 Thread LE TERTRE Alain
Hi, suppose i have a gam object gamobject- gam( Y~ s(X1)+s(X2)+ X3) I would like to extract the predicted partial effect of X3 but selecting it by its name, as it's to be included in a function and i don't always know the exact position of X3. something like

Re: [R] Using POSIX?t rather than chron or date

2003-09-17 Thread Prof Brian Ripley
On Wed, 17 Sep 2003, Martin Maechler wrote: BDR == Prof Brian Ripley [EMAIL PROTECTED] on Wed, 17 Sep 2003 06:58:48 +0100 (BST) writes: BDR On Tue, 16 Sep 2003, Deepayan Sarkar wrote: Is the date class standard enough to warrant including a check for it in lattice ?

[R] Text Vector Printing And Storage

2003-09-17 Thread Phil Saunders
I am using R 1.7.1 on Windows, running a program on a daily basis which produces a vector of text results, where the length of the vector may be different each day. While I can display this vector in the R console using a cat instruction, I am presently unable to either print it out on a

[R] arma.roots

2003-09-17 Thread Usman Shehu
Hi, I am looking for a time series function called arma.roots and I can't find it. This function compute the roots of a MA or AR defining polynomial and display graphically. Thanks Usman - Want to chat instantly with your online friends? Get the FREE

Re: [R] Using POSIX?t rather than chron or date

2003-09-17 Thread Philippe Glaziou
Martin Maechler [EMAIL PROTECTED] wrote: Could chron and date users be heard about what functionality they are missing in POSIX.t ? As a chron user, I suppose none. But I find chron more friendly and it saves some typing. In my opinion, as.POSIXct and most related functions have rather

Re: Just don't do it, surely? (was RE: [R] Retrieve ... argument values)

2003-09-17 Thread Prof Brian Ripley
On Wed, 17 Sep 2003, Simon Fear wrote: There have been various elegant solutions to test for the presence of a particular named parameter within a ... argument, such as if (!is.null(list(...)$ylim)) if (ylim %in% names(list(...))) I think I'd have to comment these lines pretty clearly if

[R] Persp and color (again)

2003-09-17 Thread ucgamdo
Hi guys, After all the discussion yesterday about persp and color, I decided to have a more closer look at demo(persp), and decided to write a function to generate 'topo-like' colours to plot perspectives (Thanks a lot to Uwe Ligges for his enlightning comments regarding the code in the demo).

[R] Fractals in R and having fun! (and more persp and color)

2003-09-17 Thread ucgamdo
Well, I started playing with fractals in R, and wrote a function to generate de Mandelbrot set, which might be of interest to some people ### # Mandelbrot set

RE: [R] Text Vector Printing And Storage

2003-09-17 Thread Pfaff, Bernhard
how about: ?write something like: your.text - c(date(), insert name of your R object, end ) write(your.text, your-text.txt, append=TRUE) date() and end should help you to separate your daily changing character vectors. HTH, Bernhard I am using R 1.7.1 on Windows, running a

RE: Just don't do it, surely? (was RE: [R] Retrieve ... argument values)

2003-09-17 Thread Simon Fear
Thanks for the insight. -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] snip dots - list(...) haveYlim - ylim %in% names(dots) is the sort of thing we still understand 5 years later. I didn't say understand, I said easily follow. Obviously how easily is

[R] Is calculating a Lake Ratio possible with R?

2003-09-17 Thread Lawrence Perepolkin
If I display a line chart, with peaks and valleys, and visualize rain falling on a mountain range, filling in all the valleys. This produces a series of lakes between peaks. In case the highest peak s not at the right most edge, erect a dam on the right to back up the water to the highest peak,

Re: [R]gam and concurvity

2003-09-17 Thread Simon Wood
in the paper Avoiding the effects of concurvity in GAM's .. of Figueiras et al. (2003) it is mentioned that in GLM collinearity is taken into account in the calc of se but not in GAM (- results in confidence interval too narrow, p-value understated, GAM S-Plus version). I haven't found

Re: [R] 3D plot/surface rotation

2003-09-17 Thread Mark Marques
Hello MZodet, Wednesday, September 17, 2003, 2:14:12 PM, you wrote: Mag How do I rotate 3D plots/surfaces generated by either cloud or wireframe? wireframe has the screen parameter which reads a list to rotate ... something in this kind: wireframe(object, screen = list( x = 5, y = 5 , z=

[R] problems making R 1.7.1

2003-09-17 Thread Ernesto Jardim
Hi, I'm building R 1.7.1 in a SuSE 8.2 box with the updated compiler from SuSE (gcc 3.1.1-16) and I'm getting this error: making dataentry.d from dataentry.c In file included from /usr/X11R6/include/X11/keysym.h:73, from dataentry.c:36:

[R] mgcv 0.9 install

2003-09-17 Thread Martin Wegmann
ps. mgcv 0.9 out now! (changes list linked to my www page) Hello, I tried to update mgcv but it doesn't work update.packages() mgcv : Version 0.8-9 in /usr/lib/R/library Version 0.9-2 on CRAN Update (y/N)? y trying URL `http://cran.r-project.org/src/contrib/mgcv_0.9-2 .tar.gz' Content type

Re: [R] 3D plot/surface rotation

2003-09-17 Thread Laurent Faisnel
[EMAIL PROTECTED] wrote: How do I rotate 3D plots/surfaces generated by either cloud or wireframe? wireframe - I think you have to set the screen parameter, see the example from ?wireframe, it seems to me you can rotate the surface as you like. I believe it's the same thing for cloud, but I did

[R] mstree

2003-09-17 Thread Mustafa Bas
hello, i have some problems with mstree! there are no similar function in R like in S-Plus! Is there somebody who has a code in R Thanks __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] R courses in germany

2003-09-17 Thread Torsten Hothorn
Starting in November, a short series of R courses will take place at the University of Hanover. The topics will include * Introduction to Data Analysis with R (T. Hothorn, U. Ligges, A. Zeileis) * Programming with R (K. Hornik, F. Leisch) * Mixed Models in S (J. Pinheiro) More details

[R]Bivariate Ripley K function

2003-09-17 Thread Karin Leiderman
Hello, I have used the univariate Ripley K function in R, but does anyone know if there is a bivariate function built in? I have two species that I am dealing with. Also, how might I add error bars into the graphs (univariate and/or bivariate)? Thank you, Karin Leiderman [EMAIL PROTECTED]

Re: [R] 3D plot/surface rotation

2003-09-17 Thread Thomas W Blackwell
Perhaps MZodet wants the interactive, mouse controlled rotation capability offered by ggobi www.ggobi.org ? Designed for linux but advertises better portability to Microsoft Windows. I have no experience myself either installing or using this. - tom blackwell - u michigan medical school -

[R] Re: mgcv 0.9 install

2003-09-17 Thread Simon Wood
/usr/bin/ld: cannot find -lf77blas - this is the problem, the linker can't find the basic linear algebra system library on your machine (I'm surprised R can be built without this). I think you may need to install the atlas package, but am not sure: hopefully someone else will know... Simon

RE: [R] gnls( ) question

2003-09-17 Thread Paul, David A
Thank you! Using control = gnlsControl(...) has made a difference in several of my model calls [no other change needed, except that gnlsControl(...) does not accept pnlsTol or pnlsMaxIter options]. For several other model calls, fiddling with the intial parameter estimates helped. Best, david

[R] all possible samples

2003-09-17 Thread lamack lamack
Dear all, there is an R function that return all possible samples of size n, with replacement, from a vector of length N ? Best regards __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] 3D plot/surface rotation

2003-09-17 Thread Uwe Ligges
Thomas W Blackwell wrote: Perhaps MZodet wants the interactive, mouse controlled rotation capability offered by ggobi www.ggobi.org ? Designed for linux but advertises better portability to Microsoft Windows. I have no experience myself either installing or using this. In that case we might want

[R] A question on seasonal time series - R package

2003-09-17 Thread Balaji Krithikaivasan
Hi there, I am using the ts class of the R package. I have a data file containing a time series of 1152 entries. It is actually 4 days data cascaded together where the time interval of data collected is 5 minutes. Thus, I have 288 values per day. When I am trying to fit this data using a

[R] Generating a point pattern

2003-09-17 Thread
I have a stem map of trees that are different from CSR at distances of 10-15 meters on a hectare plot. There are about 100 stems per ha. I want to generate a point pattern that replicates this for a model. So, about 100 trees in a 100 x 100 space that are clustered at distances from 10-15

[R] R compiled on IBM p690?

2003-09-17 Thread Simon Lin
Hello, We had all kinds of trouble of compiling/running R correctly on IBM p690. Anybody have successfully experience and would like to share with us? Please reply me personally (see my email address below), since I am not subscribing this mailing list. Thanks a lot! Simon

Re: Just don't do it, surely? (was RE: [R] Retrieve ... argument values)

2003-09-17 Thread Tony Plate
At Wednesday 11:19 AM 9/17/2003 +0100, Simon Fear wrote: There have been various elegant solutions to test for the presence of a particular named parameter within a ... argument, such as if (!is.null(list(...)$ylim)) if (ylim %in% names(list(...))) I think I'd have to comment these lines pretty

Re: [R] all possible samples

2003-09-17 Thread apjaworski
I am not sure if this is the easiest way, but you can do something like this: library(gregmisc) combinations(N, n, x, repeats=TRUE) where x is an atomic vector of size N. The only restriction is that the x vector has to have N unique elements. The combinations function will return a matrix

RE: Just don't do it, surely? (was RE: [R] Retrieve ... argument values)

2003-09-17 Thread Simon Fear
Tony, I don't understand what you mean. Could you give an example? -Original Message- From: Tony Plate [mailto:[EMAIL PROTECTED] ... I'm not saying never write functions that use ..., I'm just saying never write functions that depend on a particular argument being passed via

[R] plotting in the same figure

2003-09-17 Thread Josep Perarnau
Hello, Do you know if it's possible to create a plot as in matlab with the options hold on and hold off? For example I want to plot in the same figure the theoric cdf of the normal distribution and the empiric cdf from the raw data. Thank you, Josep.

RE: [R] plotting in the same figure

2003-09-17 Thread Liaw, Andy
Look at the argument new under ?par. Probably better way is to use the following sequence: plot(...) # whatever your first plot is. lines(...) # add line to the existing plot. points(...) # add points to the existing plot. There are many other functions that add to the existing plot. HTH,

Re: [R] Very long console input lines

2003-09-17 Thread Spencer Graves
Have you considered enclosing the very long string in parentheses? Then R will know that it is not syntactically correct until it reaches the end. To avoid that kind of thing, I routinely include ( just to the right of - in virtually any statement that might otherwise get split onto two

RE: Just don't do it, surely? (was RE: [R] Retrieve ... argument values)

2003-09-17 Thread Tony Plate
Simon, I agree, for some (maybe most) arguments it is good to know what defaults are being used. But there are some for which I really don't want to know. An example of the latter is arguments that control interaction with a database. Suppose I have a low-level interaction function that

Re: [R] Re: mgcv 0.9 install

2003-09-17 Thread Pingping Zheng
It works for me. The last link command is: gcc -shared -L/usr/local/lib -o mgcv.so gcv.o magic.o mat.o matrix.o mgcv.o qp.o tprs.o -llapack -lblas ... I have NOT got libf77blas in my linux system either but I have got libblas.a and libblas.so and the linker find the right library libblas to link.

Re: [R] 3D plot/surface rotation

2003-09-17 Thread Ben Bolker
Another possibility (to plug my own stuff) is to use the LG3d package in my bbmisc package (http://www.zoo.ufl.edu/bolker/R/src for source, http://www.zoo.ufl.edu/bolker/R/windows/ for precompiled windows package), which uses the Live3D java applet to display (rotatable etc.) graphics in a

[R] Transpose Data Frame Question

2003-09-17 Thread Bruce Coate
Hi, I have a data.frame that has 3 columns (ID, Test, Result) and looks like this 1, Test1, 120 1, Test2, 34 2, Test1, 132 2, Test2, 28 etc I would like to turn it around so that it looks like this 1, 120, 34 2, 132, 28 etc I have played around some with t and reshape, but with no

Re: [R]Bivariate Ripley K function

2003-09-17 Thread Barry Rowlingson
Roger D. Peng wrote: I believe the `splancs' package from CRAN has a bivariate K function. For error bars you'll probably have to use Monte Carlo methods. `splancs' has some tools for that. See also 'spatstat' for Kmulti and Kcross. Since R doesn't have a univariate K-function in the base

Re: [R] Transpose Data Frame Question

2003-09-17 Thread apjaworski
Here is a brute force way: mm - NULL for(i in unique(ID)){ zz - data.frame[ID==i, 3] mm - rbind(mm, c(i, zz)) } It will work as long as you have the same number of tests for each ID. If not, you would need to pad shorter zz vectors with NAs. Cheers, Andy

[R] using matrix data for function

2003-09-17 Thread Bing Zhang
Hi All, I have a function, f(x,y) I have a matrix of data, m, with the 1st column is x and the 2nd column is y What's the best way to get f(x,y) for each row of the matrix? I tried result-f(m[,1],m[,2]) but it doesn't work. Thanks! Bing - 1060 Commerce Park

RE: [R] Transpose Data Frame Question

2003-09-17 Thread Liaw, Andy
Isn't this what you want? x - data.frame(id=rep(1:2, each=2), test = rep(c(test1,test2), 2), + score = c(120, 34, 132, 28)) x id test score 1 1 test1 120 2 1 test234 3 2 test1 132 4 2 test228 reshape(x, timevar=test, direction=wide) id score.test1

AW: [R] using matrix data for function

2003-09-17 Thread Unternhrer Thomas, uth
I'm not sure if that's the best way apply(MAT, 1, FUN) -Ursprngliche Nachricht- Von: Bing Zhang [mailto:[EMAIL PROTECTED] Gesendet: Mi 17.09.2003 20:02 An: r-help Cc: Betreff: [R] using matrix data for function

[R] the name of a variable in a function

2003-09-17 Thread juli g. pausas
Dear collegues, How can I get the name of a variable (and not the variable) within a function ? For instance, in the following function, I'd like to create a variable in the dataframe df with the same name to the variable passed in var: prova - function( var ) { df -

RE: [R] using matrix data for function

2003-09-17 Thread Bing Zhang
Thanks. How about I have a third parameter for the function, which is a fixed object? i.e. the function is f(o,x,y) Bing = Original Message From [EMAIL PROTECTED] = Assuming that f(x,y) is not vectorize, try apply(your.matrix, 1, function(x) f(x[1], x[2])) as in: x.1 -

RE: [R] using matrix data for function

2003-09-17 Thread Liaw, Andy
Don't think this is best, but here's one way: mat - matrix(1:12, 6) mat [,1] [,2] [1,]17 [2,]28 [3,]39 [4,]4 10 [5,]5 11 [6,]6 12 f - function(x, y) x + y apply(mat, 1, function(x) do.call(f, as.list(x))) [1] 8 10 12 14 16 18 Note that

Re: [R] the name of a variable in a function

2003-09-17 Thread Douglas Bates
Well you don't know that the actual argument to a function is a name - it could be a more complex expression. In any case, you can get the expression that was the actual argument with the substitute function, then you need to deparse it. Your function could be written prova - function( var ) +

[R] CART analysis

2003-09-17 Thread Ron Thornton
Greetings, Does anyone know of an R code for classification and regression tree analysis (CART)? Thank you Ron Ron Thornton BVSc, PhD, MACVSc (pathology, epidemiology) Programme Co-ordinator, Active Surveillance Animal Biosecurity MAF Biosecurity Authority P O Box 2526 Wellington, New Zealand

RE: [R] CART analysis

2003-09-17 Thread Vladimir N. Kutinsky
Ron, Does anyone know of an R code for classification and regression tree analysis (CART)? If I got you right, you need a tree package. It implemets the CART method. If you go further, you will like randomForest package. Regards, Vladimir __ [EMAIL

Re: [R] Using POSIX?t rather than chron or date

2003-09-17 Thread Gabor Grothendieck
The problem with POSIXt is that you must consider timezones and daylight vs. standard time issues even if you don't want to. This violates modularity (viz. your routines becomes coupled to unrelated information) and leads to subtle errors where different routines are assuming different time

RE: [R] CART analysis

2003-09-17 Thread Paul, David A
library(tree) ?tree should work. If you don't have the tree library, you can download it off of CRAN at http://cran.r-project.org/bin/windows/contrib if you're using Windows, or go to http://cran.r-project.org/src/contrib/PACKAGES.html for the source code directly as gzipped .tar files.

RE: [R] CART analysis

2003-09-17 Thread Ko-Kang Kevin Wang
Or, I think, the rpart package. On Thu, 18 Sep 2003, Vladimir N. Kutinsky wrote: Date: Thu, 18 Sep 2003 00:18:25 +0400 From: Vladimir N. Kutinsky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [R] CART analysis Ron, Does anyone know of an R code for classification and regression

Re: [R] using matrix data for function

2003-09-17 Thread Jason Turner
On Thu, 2003-09-18 at 06:02, Bing Zhang wrote: Hi All, I have a function, f(x,y) I have a matrix of data, m, with the 1st column is x and the 2nd column is y What's the best way to get f(x,y) for each row of the matrix? I tried result-f(m[,1],m[,2]) but it doesn't work. That is the best

RE: [R] using matrix data for function

2003-09-17 Thread Jason Turner
On Thu, 2003-09-18 at 06:41, Bing Zhang wrote: Thanks. How about I have a third parameter for the function, which is a fixed object? i.e. the function is f(o,x,y) 1) My earlier reply had a typo. Should've been apply(m,1,f). 2) Luckily, the answer to this question, and any more you're likely

Re: [R] Using POSIX?t rather than chron or date

2003-09-17 Thread Jason Turner
On Wed, 2003-09-17 at 19:03, Gabor Grothendieck wrote: The problem with POSIXt is that you must consider timezones and daylight vs. standard time issues even if you don't want to. ... I had previously suggested that we either put chron into the base or create a new timezone-less version

Re: [R] Using POSIX?t rather than chron or date

2003-09-17 Thread Gabor Grothendieck
The problem with using a convention is that you can't be guaranteed that all the routines you use also use that same convention. You still have to understand how each of the routines you use handle time zones and you are dragged into thinking about an irrelevant piece of information violating

RE: [R] Building and loading a DLL on Windows NT

2003-09-17 Thread Benjamin . STABLER
Thanks. I didn't try the Borland utility but your response reminded me of a way to view the DLL info in Windows. Right click a DLL and then quick view and Windows outputs some file information, including the Export table which lists the names of the symbols in the DLL. The name of the add

[R] Building XML library on MacOS X

2003-09-17 Thread Sean Davis
This is not a strictly R question, but I am trying to build the XML package on MacOS X and have not been successful. I have tried using expat, libxml, and libxml2 without success in building. Has someone successfully done this that could enlighten me with the process (especially as it relates to

RE: [R] all possible samples

2003-09-17 Thread Ted Harding
On 17-Sep-03 lamack lamack wrote: Dear all, there is an R function that return all possible samples of size n, with replacement, from a vector of length N ? Without delving into R to see if such a thing exists already, I can suggest the following (based on an algorithm to be found in

[R] RE: all possible samples

2003-09-17 Thread Dennis J. Murphy
Hi, Another possibility is to use the combinations function in the gregmisc package, which has an option repeats.allowed. Sorry for not including the original post, but I had deleted it from my mailbox earlier in the day. HTH, Dennis __ [EMAIL

[R] subsetting matrix replacement oddities

2003-09-17 Thread Ross Boylan
When assigning a dataframe to a subset of a matrix I got a very odd result. Am I missing something, or is this a bug? Details are below. Also, if m is defined outside of the current function, is m[...] - foo necessary to update it, or does regular replacement m[] - foo work (that is, does

Re: [R] subsetting matrix replacement oddities

2003-09-17 Thread Spencer Graves
A subset of a data.frame is still a data.frame. A data.frame is actually a list with additional attributes. As far as I know, your solution, as.matrix, is an appropriate tool to convert a data.frame to a matrix. Caution may be appropropriate, however, because if the data.frame includes

[R] Suming logical vectors

2003-09-17 Thread Murray Jorgensen
Can anyone explain the following? [R 1.6.0 Windows XP, yes I will upgrade soon.] Murray sort(IATmedian)[0:50]==0 [1] TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE [25] FALSE FALSE FALSE

Re: [R] Suming logical vectors

2003-09-17 Thread Deepayan Sarkar
Your IATmedian has some NAs (which are removed by sort) ? On Thu, 18 Sep 2003, Murray Jorgensen wrote: Can anyone explain the following? [R 1.6.0 Windows XP, yes I will upgrade soon.] Murray sort(IATmedian)[0:50]==0 [1] TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

Re: [R] Suming logical vectors

2003-09-17 Thread Murray Jorgensen
Blush! Not too hard to explain at all! Deepayan Sarkar wrote: Your IATmedian has some NAs (which are removed by sort) ? On Thu, 18 Sep 2003, Murray Jorgensen wrote: Can anyone explain the following? [R 1.6.0 Windows XP, yes I will upgrade soon.] Murray sort(IATmedian)[0:50]==0 [1] TRUE

Re: [R] Date on x-axis of xyplot

2003-09-17 Thread Deepayan Sarkar
[Due to problems with my mail client, this message may eventually reach the list twice. Sorry about that.] On Wednesday 17 September 2003 08:51, David James wrote: Prof Brian Ripley wrote: On Tue, 16 Sep 2003, Deepayan Sarkar wrote: Is the date class standard enough to warrant including a

[R] print graph

2003-09-17 Thread Atsuya Fujito
Hello. I am using R 1.7.1 on Mac OSX10.2.6 and XDarwin86 4.3. I made barplot graph by barplot2. I can get good graph on x11() device. But when change the device to potscript(), the graph changed to incomplete. For example, absence of label or err bar or ... I would like to print out this graph.

Re: [R] print graph

2003-09-17 Thread Marc Schwartz
On Wed, 2003-09-17 at 21:56, Atsuya Fujito wrote: Hello. I am using R 1.7.1 on Mac OSX10.2.6 and XDarwin86 4.3. I made barplot graph by barplot2. I can get good graph on x11() device. But when change the device to potscript(), the graph changed to incomplete. For example, absence of