Re: [R] How to append to a data.frame?

2003-12-09 Thread David Kreil
Dear Prof. Ripley, Thank you very much for your fast and helpful reply! Is there a canonical way of doing this without a kludge or is the below adequate? d-as.data.frame(matrix(nrow=1000)) With many thanks again for your help, Yours sincerely, David Kreil.

Re: [R] How to append to a data.frame?

2003-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2003, David Kreil wrote: Dear Prof. Ripley, Thank you very much for your fast and helpful reply! Is there a canonical way of doing this without a kludge or is the below adequate? d-as.data.frame(matrix(nrow=1000)) You need to set up the columns as you need them to

[R] Font problem

2003-12-09 Thread John Dougherty
Some plots fail due to a problem with the X11 fonts. I get a message that X11 font at size 22 could not be loaded. The demo() graphics routine for instance dies during the third chart. The graphics demo calls font.main=1 and that seems to be where the error is. I believe this is due to a

Re: [R] How to append to a data.frame?

2003-12-09 Thread David Kreil
Yes, once I've named the first column, I can add further ones by saying d[c(x,y,z)]=NA or such. I was just wondering whether that was the way to do it or whether there was a more elegant approach. Preallocation was the critical clue I needed. Thanks again for your help, David.

Re: [R] axes that meet

2003-12-09 Thread Uwe Ligges
Hank Stevens wrote: R v. 1.7.1, Windows 2000. A particular journal wants me to provide scatter plots with no box, but with axes that meet in the lower left corner. It seems as though there must be an easy way of doing this, but my reading the help on plot.default, axis, and box have not

Re: [R] Interfacing R and Python in MS Windows

2003-12-09 Thread Uwe Ligges
Héctor Villafuerte D. wrote: Hi all, I need the power of R from within some of my Python programs... I use debian linux (woody) at home and windows XP at work (the latter is where I need to get things done!) This are my packages: R 1.8.0 Python 2.3 RSPython 0.5-3 This is what I've done: (1) Since

Re: [R] How to append to a data.frame?

2003-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2003, David Kreil wrote: Yes, once I've named the first column, I can add further ones by saying d[c(x,y,z)]=NA or such. I was just wondering whether that was the way to do it or whether there was a more elegant approach. Preallocation was the critical clue I needed. Use an

Re: [R] How to append to a data.frame?

2003-12-09 Thread David Kreil
Ok, how can I both allocate storage and specify column names in a data.frame call, please? Apologies if I'm being slow here. With many thanks again, David. Yes, once I've named the first column, I can add further ones by saying d[c(x,y,z)]=NA or such. I was just wondering whether that was

Re: [R] p-value from chisq.test working strangely on 1.8.1

2003-12-09 Thread Torsten Hothorn
Hello everybody, I'm seeing some strange behavior on R 1.8.1 on Intel/Linux compiled with gcc 3.2.2. The p-value calculated from the chisq.test function is incorrect for some input values: chisq.test(matrix(c(0, 1, 1, 12555), 2, 2), simulate.p.value=TRUE) Pearson's

[R] The spdep package

2003-12-09 Thread Osmo Kolehmainen
Hi, Here is a listw object z corresponding to the matrix W. I understand n, nn, S0, S1 and S2 in the weights constants summary. Is it simply so that n1 = n-1, n2 = n-2 and n3 = n-3? If this is true where they are needed? Just wondering Osmo W [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]

[R] R: the spdep package

2003-12-09 Thread Osmo Kolehmainen
Hi, Here is a listw object z corresponding to the matrix W. I understand n, nn, S0, S1 and S2 in the weights constants summary. Is it simply so that n1 = n-1, n2 = n-2 and n3 = n-3? If this is true where they are needed? Just wondering Osmo W [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0

[R] Alpha

2003-12-09 Thread Poizot Emmanuel
Hello, I just install red-hat 7.2 for alpha station. I downloaded R-1.8.1-1.alpha.rpm, but unable to install it. I need the libblas.so.3 library. I did have a look around and did not find where to get that library for linux alpha version. -- regards

Re: [R] Alpha

2003-12-09 Thread alessandro . semeria
Try to install ATLAS (improved version of BLAS libraries): sources form http://www.netlib.org/atlas/index.html#software Best regards A.S. Alessandro Semeria Models and Simulations Laboratory Montecatini Environmental Research Center (Edison Group), Via Ciro

RE: [R] axes that meet

2003-12-09 Thread Pikounis, Bill
Hank, I think the graphical parameter you are looking for is bty, as in par(bty=l) Details on the ?par help topic. Hope that helps. Bill Bill Pikounis, Ph.D. Biometrics Research Department Merck Research Laboratories PO Box 2000, MailDrop RY33-300

Re: [R] How to append to a data.frame?

2003-12-09 Thread Jason Turner
David Kreil wrote: Ok, how can I both allocate storage and specify column names in a data.frame call, please? Apologies if I'm being slow here. With many thanks again, David. Something like (UNTESTED code follows) templateColumn - rep(NA,1000) # for 1000 rows foo - data.frame( x =

Re: [R] How to append to a data.frame?

2003-12-09 Thread Peter Dalgaard
David Kreil [EMAIL PROTECTED] writes: Ok, how can I both allocate storage and specify column names in a data.frame call, please? Apologies if I'm being slow here. It gets a little tricky. I'd try something along the lines of

Re: [R] Font problem

2003-12-09 Thread Peter Dalgaard
John Dougherty [EMAIL PROTECTED] writes: Some plots fail due to a problem with the X11 fonts. I get a message that X11 font at size 22 could not be loaded. The demo() graphics routine for instance dies during the third chart. The graphics demo calls font.main=1 and that seems to be

Re: [R] trouble with predict.l1ce

2003-12-09 Thread Martin Maechler
clayton == clayton springer [EMAIL PROTECTED] on Mon, 8 Dec 2003 13:48:11 -0500 writes: clayton Dear R-help, I am having trouble with the predict clayton function in lasso2. For example: data(Iowa) l1c.I - l1ce(Yield ~ ., Iowa, bound = 10, absolute.t=TRUE) predict (l1c.I)

[R]: global and local variables

2003-12-09 Thread allan clark
Hi all I have a problem pertaining to local and global variables. Say I have a function defined as follows: a-function(x) {yx^2} i.e a(2) [1] 4 function b is now defined to take the value of y and do some manipulation with it. As it stands I dont know how to

Re: [R]: global and local variables

2003-12-09 Thread Uwe Ligges
allan clark wrote: Hi all I have a problem pertaining to local and global variables. Say I have a function defined as follows: a-function(x) {yx^2} i.e a(2) [1] 4 The function a specified above won't return 4! function b is now defined to take the value of y and

[R] levelplot parameters

2003-12-09 Thread Joerg Schaber
Hi, I have a levelplot with one panel. I just can't find out how I can manipulate the size of the axis lables. e.g. scales.cex doesn't work, the usual par-parameters either. Any hint? joerg __ [EMAIL PROTECTED] mailing list

RE: [R] axes that meet

2003-12-09 Thread partha_bagchi
It might also mean that he is looking for par(xaxs = i, yaxs = i) Pikounis, Bill [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 12/09/2003 05:23 AM To: 'Hank Stevens' [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:RE: [R] axes that meet Hank, I think

[R]: global and local variables

2003-12-09 Thread allan clark
Hi Thanx for those who responded to my problem. In my previous email I tried to ask a general question and probably never explained myself correctly. I wanted to prevent sending this long email. My apologies. This is my actual problem. I have a regression problem. I am

Re: [R] p-value from chisq.test working strangely on 1.8.1

2003-12-09 Thread Marc Schwartz
On Tue, 2003-12-09 at 02:23, Torsten Hothorn wrote: Hello everybody, I'm seeing some strange behavior on R 1.8.1 on Intel/Linux compiled with gcc 3.2.2. The p-value calculated from the chisq.test function is incorrect for some input values: chisq.test(matrix(c(0, 1, 1, 12555),

[R] Importing TIFF files into a R matrix

2003-12-09 Thread peter . hagedorn
Hi I am facing a problem where I would like to import a TIFF image (of spots on a nylon filter) into R (into a matrix for example). When plotting the matrix using fx. scatterplot3d I would then be able to see how the pixel-intensities are distributed in spot-areas on the filter - which would

Re: [R] Font problem

2003-12-09 Thread Marc Schwartz
On Tue, 2003-12-09 at 08:07, Peter Dalgaard wrote: Marc Schwartz [EMAIL PROTECTED] writes: snip Actually, I think you can leave the :unscaled on. Seems to work for me. Could be. That is, I believe, the default on a new install. It was on FC1 for me (I have not had font problems so far) and I

[R] PROC MIXED vs. lme()

2003-12-09 Thread Manuel A. Morales
I'm trying to learn how to do a repeated measures ANOVA in R using lme(). A data set that comes from the book Design and Analysis has the following structure: Measurements (DV) were taken on 8 subjects (SUB) with two experimental levels (GROUP) at four times (TRIAL). In SAS, I use the code:

RE: [R] levelplot parameters

2003-12-09 Thread Liaw, Andy
See the scales argument in ?xyplot, which has: scales: list determining how the x- and y-axes (tick marks and labels) are drawn. The list contains parameters in name=value form, and may also contain two other lists called 'x' and 'y' of the same form (described

RE: [R] Importing TIFF files into a R matrix

2003-12-09 Thread Henrik Bengtsson
Hi, I do not know of any free TIFF readers for R, so I suggest that you use an external TIFF-to-Portable Pixmap coverter and then use the pixmap package available on CRAN. I recommend ImageMagick's convert program available for Unix, Linux, Windows, Windows/Cygwin etc at

Re: [R] Font problem

2003-12-09 Thread Peter Dalgaard
Marc Schwartz [EMAIL PROTECTED] writes: It may be as simple as being sure that both the 75 dpi and 100 dpi fonts are loaded as the SUSE query earlier this year seemed to indicate that the 100 dpi fonts were not installed initially. I actually wrote the bug so I'm supposed to know what it is

Re: [R] Interfacing R and Python in MS Windows

2003-12-09 Thread Héctor Villafuerte D.
Uwe Ligges wrote: Héctor Villafuerte D. wrote: Hi all, I need the power of R from within some of my Python programs... I use debian linux (woody) at home and windows XP at work (the latter is where I need to get things done!) This are my packages: R 1.8.0 Python 2.3 RSPython 0.5-3 This is what

RE: [R] axes that meet

2003-12-09 Thread Hank Stevens
Thank you to all who replied. par(bty) and par(xaxs, yaxs) gave me all I need (and more!) for specifiying axes in the fashion required. Thanks, Hank At 07:28 AM 12/9/2003, [EMAIL PROTECTED] wrote: It might also mean that he is looking for par(xaxs = i, yaxs = i) Pikounis, Bill [EMAIL

Re: [R] Design functions after Multiple Imputation

2003-12-09 Thread Frank E Harrell Jr
On Mon, 08 Dec 2003 21:23:40 + Umberto Maggiore [EMAIL PROTECTED] wrote: I am a new user of R for Windows, enthusiast about the many functions of the Design and Hmisc libraries. I combined the results of a Cox regression model after multiple imputation(of missing values in some

Re: [R] p-value from chisq.test working strangely on 1.8.1

2003-12-09 Thread John Dougherty
It happens with suse 9.0 as well. ... chisq.test(matrix(c(0, 1, 1, 12556), 2, 2), simulate.p.value=TRUE) Pearson's Chi-squared test with simulated p-value (based on 2000

[R] FW: Symposium COMPSTAT 2004

2003-12-09 Thread Rau, Roland
Dear all, I just received the following message, and I think it might be of interest to the R-list. Cordially, Roland - all people interested in COMPSTAT 2004 Symposium Prague December 8, 2004 Dear colleague, thank you very much for your

[R] problem with pls(x, y, ..., ncomp = 16): Error in inherits(x, data.frame) : subscript out of bounds

2003-12-09 Thread ryszard . czerminski
When I try to use ncomp parameter in pls procedure I get following error: library(pls.pcr) m - pls(x, y, validation = CV, niter = 68, ncomp = 16) Error in inherits(x, data.frame) : subscript out of bounds Without ncomp parameter everything seems to work OK dim(x) [1] 68 116 dim(y) [1] 68

Re: [R] p-value from chisq.test working strangely on 1.8.1

2003-12-09 Thread Jeffrey Chang
On Dec 9, 2003, at 9:37 AM, Peter Dalgaard wrote: Marc Schwartz [EMAIL PROTECTED] writes: Confirmed on Fedora Core 1 with R Version 1.8.1 Patched (2003-12-07) compiled using gcc (GCC) 3.3.2 20031107 (Red Hat Linux 3.3.2-2). chisq.test(matrix(c(0, 1, 1, 12555), 2, 2), simulate.p.value=TRUE) ...

RE: [R] Matrix to dates

2003-12-09 Thread Gabor Grothendieck
z - matrix( c(1960,1960,1961,1,9,6), 3, 2 ) 1. Using chron: require(chron) chron( paste( z[,2], 1, z[,1], sep=/ ) ) 2. Using POSIXct: ISOdate( z[,1], z[,2], 1 ) # relative to GMT time zone or ISOdate( z[,1], z[,2], 1, tz= ) # relative to current time zone --- Date: Mon, 8

Re: [R] R: the spdep package

2003-12-09 Thread Roger Bivand
On Tue, 9 Dec 2003, Osmo Kolehmainen wrote: Hi, Here is a listw object z corresponding to the matrix W. I understand n, nn, S0, S1 and S2 in the weights constants summary. Is it simply so that n1 = n-1, n2 = n-2 and n3 = n-3? If this is true where they are needed? Yes, used in calculating

Re: [R] Windows Memory Issues

2003-12-09 Thread Benjamin . STABLER
I would also like some clarification about R memory management. Like Doug, I didn't find anything about consecutive calls to gc() to free more memory. We run into memory limit problems every now and then and a better understanding of R's memory management would go a long way. I am interested in

Re: [R] How to append to a data.frame?

2003-12-09 Thread David Kreil
Dear Peter Dalgaard, Thank you for these examples, they are very neat! I really like the data.frame(x=as.numeric(NA),y=factor(NA))[rep(NA,1000),] trick. With best regards, David. Dr David Philip Kreil

Re: [R] Windows Memory Issues

2003-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2003 [EMAIL PROTECTED] wrote: I would also like some clarification about R memory management. Like Doug, I didn't find anything about consecutive calls to gc() to free more memory. It was a statement about Windows, and about freeing memory *to Windows*. Douglas Grove apparently

RE: [R] Windows Memory Issues

2003-12-09 Thread Pikounis, Bill
[snipped] Or maybe some good links about memory and garbage collection. As is mentioned time-to-time on this list when the above subject comes up, Windows memory is a complicated topic. One open-source utility I have found helpful to monitor memory when I work under XP is called RAMpage,

[R] Contour plots

2003-12-09 Thread Qinghua Song
I am drawing several contour plots in one page. I use image, and get several contours. But I don't know how to control the color in more than one plots. For example, same color corresponds to different dependent values in different plots. For example, yellow means z=100(the highest value) in

Re: [R] Contour plots

2003-12-09 Thread Bill Simpson
I am drawing several contour plots in one page. I use image, and get several contours. But I don't know how to control the color in more than one plots. For example, same color corresponds to different dependent values in different plots. For example, yellow means z=100(the highest value) in

[R] R Interface handholding

2003-12-09 Thread Pat Gunn
Hello, I need a bit of handholding with R, specifically, with writing packages for it. I'm a systems programmer, and am, on the request of several users of our software, working on generating R interfaces. For starters, I've written the following R function (which compiles): SEXP myincr(SEXP

RE: [R] Windows Memory Issues

2003-12-09 Thread Benjamin . STABLER
Thanks for the reply. So are you saying that multiple calls to gc() frees up memory to Windows and then other processes can use that newly freed memory? So multiple calls to gc() does not actually make more memory available to new R objects that I might create. The reason I ask is because I

[R] C++: SET_LENGTH() Over Many Iterations?

2003-12-09 Thread Jim Java
In a C++ extension to R (v 1.8.1), I've been experimenting with a generic push back function to tack one value at a time onto the end of an R vector created within the extension. After calling this function a certain number of times Rgui.exe (I'm writing in Windows using Visual Studio .NET 2003)

Re: [R]: global and local variables

2003-12-09 Thread Karl Knoblick
Hi! I'm no guru in R. But I can think of 2 ways (have to be tried): 1) As Uwe Ligges said: just save return the stored variable a-preprocess(xdata) and return it (if you want to return more than 1 item use list) and give this variable to the next function. Example: func1-function(x) { y-x^2 #

RE: [R] problem with pls(x, y, ..., ncomp = 16): Error in inherit s( x, data.frame) : subscript out of bounds

2003-12-09 Thread ryszard . czerminski
Help for pls says: ?pls [...] Arguments: ... ncomp: the numbers of latent variables to be assessed in the modelling. Default is from one to the rank of 'X'. [...] so my assumption was (maybe wrong) that idea of ncomp parameter is to limit number of assessed variables. also, if

Re: [R] Interfacing R and Python in MS Windows

2003-12-09 Thread Héctor Villafuerte D.
I got farther this time, but it wasn't enough though... does anyone know what this errors are? Thanks! Hector E:\to_doRcmd INSTALL e:/to_do/RSPython.tar.gz -- Making package RSPython ** WARNING: this package has a configure

RE: [R] Windows Memory Issues

2003-12-09 Thread Thomas Lumley
On Tue, 9 Dec 2003 [EMAIL PROTECTED] wrote: Thanks for the reply. So are you saying that multiple calls to gc() frees up memory to Windows and then other processes can use that newly freed memory? No. You typically can't free memory back to Windows (or many other OSes). So

RE: [R] Windows Memory Issues

2003-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2003 [EMAIL PROTECTED] wrote: Thanks for the reply. So are you saying that multiple calls to gc() frees up memory to Windows and then other processes can use that newly freed memory? So multiple calls to gc() does not actually make more memory That is what I said. Why do

RE: [R] Windows Memory Issues

2003-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2003, Thomas Lumley wrote: On Tue, 9 Dec 2003 [EMAIL PROTECTED] wrote: Thanks for the reply. So are you saying that multiple calls to gc() frees up memory to Windows and then other processes can use that newly freed memory? No. You typically can't free memory back to

Re: [R] Interfacing R and Python in MS Windows

2003-12-09 Thread Prof Brian Ripley
I believe RSPython is from Omegahat, so why not ask on the mailing list for Omegahat? On Tue, 9 Dec 2003, Héctor Villafuerte D. wrote: I got farther this time, but it wasn't enough though... does anyone know what this errors are? -- Brian D. Ripley, [EMAIL PROTECTED]

[R] packages for ecologists

2003-12-09 Thread Martin Wegmann
Hello R-user, sorry for this very off-topic question. But I shall present R to my dept. (pro's and con's and what it can do). The pro's and con's are easy but not what R can do (additional to the normal statistics). I looked through the packages, but the enormous amount of packages makes it

RE: [R] packages for ecologists

2003-12-09 Thread Herzog, Mark
Definitely take a look at WiSP. http://www.ruwpa.st-and.ac.uk/estimating.abundance/WiSP/ Mark == Mark Herzog Post Doctoral Researcher Dept. of Natural Resources and Environmental Science University of Nevada Reno Reno, NV 89512 (775) 784-6984 (office)

[R] histogram density division

2003-12-09 Thread Mathieu Drapeau
Hi, I already sent this query but I didn't receive any answers. I try another time and try to explain another way my question... I want to decrease the height of my bands in my histogram by a factor of 5... how can I do that? Is there an argument to hist() that do the job? Thanks, Mathieu Hi, I

[R] Johnson's Sb distribution

2003-12-09 Thread Christian Mora
Hi all; I'm working with the library SuppDists trying to fit a Johnson's Sb distribution to a dataset. It works fine, but I need to set one of the location parameters (epsilon) to zero. How can I do this using the function JohnsonFit() or any other similar? ...and Is it possible to define the

Re: [R] histogram density division

2003-12-09 Thread Thomas W Blackwell
Mathieu - That's easy. Assign the return value of hist() to some variable, say fixed, then go in and hack the value of fixed$counts however you like, and re-plot using plot(fixed). Example code: fixed - hist(rnorm(2000)) fixed$counts - fixed$counts / 5 plot(fixed) I confess I didn't quite

Re: [R] R Interface handholding

2003-12-09 Thread Douglas Bates
I'm not sure exactly what you want to do but it seems you are going about it in an overly complicated way. If you are going to build a package you just need to put a NAMESPACE file at the top level and include a useDynLib specification or write a short R function called .First.Lib that calls

[R] Key for custom lattice panel function

2003-12-09 Thread Hadley Wickham
Hi all, I've created a custom lattice panel function for levelplot - instead of representing z by colour, it plot circles with radius proportional to z (in the style of the map plots of Jacques Bertin). I'm happy to email an example graph to anyone interested. The problem is now to create a

[R] OT: BibTex year-only citation in text?

2003-12-09 Thread Jason Turner
Sorry for the off-topic question, but I know there are some talented LaTeX users out there. Which bibliography style gives only the year in text citations (e.g for further details, see Anderson (1992) )? Thanks Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz

Re: [R] Key for custom lattice panel function

2003-12-09 Thread Deepayan Sarkar
On Tuesday 09 December 2003 16:37, Hadley Wickham wrote: Hi all, I've created a custom lattice panel function for levelplot - instead of representing z by colour, it plot circles with radius proportional to z (in the style of the map plots of Jacques Bertin). I'm happy to email an example

[R] nested analysis with lme - odd result?

2003-12-09 Thread Gary Allison
Hello! When I simulate variance at only a single level in a nested analysis using lme (all levels are random effects), the results confuse me. Instead of lme reporting high variance in only that simulated level, substantial variance (10% of simulated level) often appears in other levels -- in

[R] expressing functions

2003-12-09 Thread Remington, Richard
# Why does expressing one function require(ctest) t.test # return only function (x, ...) UseMethod(t.test) environment: namespace:ctest # but expressing another function shapiro.test # returns more complete code? function (x) { DNAME - deparse(substitute(x)) x -

Re: [R] expressing functions

2003-12-09 Thread Prof Brian Ripley
On Tue, 9 Dec 2003, Remington, Richard wrote: # Why does expressing one function require(ctest) t.test # return only function (x, ...) UseMethod(t.test) environment: namespace:ctest # but expressing another function shapiro.test # returns more complete code? [...] False

Re: [R] expressing functions

2003-12-09 Thread Jason Turner
Remington, Richard wrote: # Why does expressing one function require(ctest) t.test # return only function (x, ...) UseMethod(t.test) environment: namespace:ctest # but expressing another function shapiro.test # returns more complete code? function (x) { DNAME - deparse(substitute(x))

RE: [R] OT: BibTex year-only citation in text?

2003-12-09 Thread Matt Nelson
Jason, For many bibliography styles, the command \citeyear{key} will work. If this doesn't work for the style you are using, you can investigate style-specific methods or consider other styles. I find that natbib is good for author-year formats. If you use Latex more than on occasion, a good

Re: [R] expressing functions

2003-12-09 Thread Gabor Grothendieck
Perhaps what should be added to the previous answers is that you can find out where the real work is done like this: require(ctest) t.test methods(t.test) ctest:::t.test.default ctest:::t.test.formula If the class of the first argument to t.test is formula then t.test.formula gets invoked so

[R] pvalues

2003-12-09 Thread Maya Sanders
dear all- If I have a vector of numbers (not necessarily normally distributed) how can I get the p-value of a number in this distribution. I am interested in the inverse of 'quantile' . thank you- Maya __ [EMAIL PROTECTED] mailing list