Re: [R] Advice on parsing formulae

2004-12-16 Thread Peter Dalgaard
Claus Dethlefsen [EMAIL PROTECTED] writes: Thank you for the advice. I have now boiled my problem down to the following: How do I create fm2 from fm1 ? fm1 - Y ~ 1 + tvar(x:A) + tvar(z) + u + tvar(B) + tvar(poly(v,3)) fm2 - Y ~ 1 + x:A + z + u + B + poly(v, 3) Thus, how do I simply

Re: [R] 3 questions

2004-12-16 Thread Dieter Menne
1) I have constracted a function that returns an output, which runs in a while ( condition ){ run function } loop. I would like to know if there is a way to get the outputs in different windows, every time the function runs, so as to compare easier the results. Try windows(). But better

Re: [R] 3 questions

2004-12-16 Thread Adaikalavan Ramasamy
Please learn to wrap your emails at about 72 characters. See below for other comments. On Thu, 2004-12-16 at 08:29, vasilis pappas wrote: Hello R users, I have three questions and I would be grateful if someone could give me an answer to each of these. 1) I have constracted a

[R] Lazy-loading db setup in the R build process

2004-12-16 Thread Simon Pickering
Hi All, I have read the article on lazy-loading in the September R news letter, and think I have at least a vague grasp on what is happening. Am I right in thinking that, assuming I were using the same packages, I could copy the .rdb .rdx files from one installation of R (2.0.0) to another? I

[R] PL/R calls fail

2004-12-16 Thread Stefan Sobernig
Hi all, I am currently trying to create a development environment including PostgreSQL 8.0.0rc1, R 2.0.1 and PL/R on a system running Fedora Cora 1. So far, I have suceeded in setting up PostgreSQL and R as a shared library - unfortunately I have not been able to link these two spheres by adding

Re: [R] Lazy-loading db setup in the R build process

2004-12-16 Thread Brian D Ripley
On 16 Dec 2004, Peter Dalgaard wrote: Simon Pickering [EMAIL PROTECTED] writes: Hi All, I have read the article on lazy-loading in the September R news letter, and think I have at least a vague grasp on what is happening. Am I right in thinking that, assuming I were using the same

RE: [R] how R outputs?

2004-12-16 Thread Liaw, Andy
If R is run in interactive mode; i.e., interactive() == TRUE, whatever function calls that produced R objects gets printed (by calling the appropriate print() method; known as auto-printing), unless the object is returned invisibly (i.e., wrapped in invisible()). As an example, if you put

Re: [R] Lazy-loading db setup in the R build process

2004-12-16 Thread Peter Dalgaard
Brian D Ripley [EMAIL PROTECTED] writes: On 16 Dec 2004, Peter Dalgaard wrote: Simon Pickering [EMAIL PROTECTED] writes: stuff more stuff [...] Take a look at cross-compiling (Windows under Linux). We have failed to make lazy loading of base work under cross-compilation, but do

RE: [R] 3 questions

2004-12-16 Thread John Fox
Dear Vasilis, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vasilis pappas Sent: Thursday, December 16, 2004 3:30 AM To: [EMAIL PROTECTED] Subject: [R] 3 questions . . . 2) In my function I make use of the Rcmdr package. But every time I

RE: [R] Detecting incomplete commands

2004-12-16 Thread Philippe Grosjean
Thank you Thomas for your answer. This is of course what I intend to do (indeed, to use a tryCatch(), instead of I try(). However, I would like to have a different behaviour depending if the synthax is incorrect ls()) for instance, or incomplete ls( for instance. Indeed, exactly like the

Re: [R] Advice on parsing formulae

2004-12-16 Thread Gabor Grothendieck
Claus Dethlefsen dethlef at math.aau.dk writes: : : Thank you for the advice. I have now boiled my problem down to the : following: : : How do I create fm2 from fm1 ? : : fm1 - Y ~ 1 + tvar(x:A) + tvar(z) + u + tvar(B) + tvar(poly(v,3)) : fm2 - Y ~ 1 + x:A + z + u + B + poly(v, 3) : : Thus,

Re: [R] Detecting incomplete commands

2004-12-16 Thread Peter Dalgaard
Philippe Grosjean [EMAIL PROTECTED] writes: Thank you Thomas for your answer. This is of course what I intend to do (indeed, to use a tryCatch(), instead of I try(). However, I would like to have a different behaviour depending if the synthax is incorrect ls()) for instance, or incomplete ls(

[R] Problem with postscript graphics device driver

2004-12-16 Thread Jeffrey Freedman
I recently installed R version 2.01 for OS X (version 10.3.6). I now get the following error message when I try to use the postscript function: Error in get(name.opt, envir = envir) : Object .PSenv not found This did not happen in previous versions of R (i.e. 1.9). I do not get this error

RE: [R] partial linear model

2004-12-16 Thread Liaw, Andy
What kinds of terms do you have in mind for the non-linear parts? gam() in both mgcv and gam will accommodate linear terms, so they ought to work, no? Andy From: Jin Shusong Dear all, Are there any packages can estimate the partial linear model. Or any one can give me any suggestions.

[R] Customizing axis labels with alternating in lattice

2004-12-16 Thread Waichler, Scott R
I would like to have complete control over which plots and which axes have labels in a lattice figure. I tried lots of vectors for the alternating setting in scales, but none worked. Here is what I would like to do for a 2 col x 3 row figure, where the x designates a location I would like to

Re: [R] Customizing axis labels with alternating in lattice

2004-12-16 Thread Deepayan Sarkar
On Thursday 16 December 2004 09:58, Waichler, Scott R wrote: I would like to have complete control over which plots and which axes have labels in a lattice figure. I tried lots of vectors for the alternating setting in scales, but none worked. Here is what I would like to do for a 2 col x 3

Re: [R] Problem with postscript graphics device driver

2004-12-16 Thread Brian D Ripley
If you mean R 2.0.1, your installation is broken. Here's a quick check of where it should be: ls(asNamespace(grDevices), all=TRUE) [1] .PSenv .Quartzenv .X11env [4] .__NAMESPACE__. .__S3MethodsTable__. .packageName On Thu, 16 Dec 2004, Jeffrey Freedman

Re: [R] Percentages in contingency tables *warning trivial question*

2004-12-16 Thread Dirk Enzmann
Being still unsatisfied with the CrossTable() function I modified the code so that the function will create an output similar to the SPSS procedure CROSSTABS. Most probably the code will not meet most R programmers' standards, perhaps someone else is willing to optimize it. Unfortunately, as

Re: [R] Percentages in contingency tables *warning trivial question*

2004-12-16 Thread Marc Schwartz
On Thu, 2004-12-16 at 17:45 +0100, Dirk Enzmann wrote: Being still unsatisfied with the CrossTable() function I modified the code so that the function will create an output similar to the SPSS procedure CROSSTABS. Most probably the code will not meet most R programmers' standards, perhaps

RE: [R] SAS or R software

2004-12-16 Thread Warnes, Gregory R
- Output delivery system (ODS): *Every* piece of SAS output is an output object that can be captured as a dataset, rendered in RTF, LaTeX, HTML, PDF, etc. with a relatively simple mechanism (including graphs) ods pdf file='mystuff.pdf''; any sas stuff ods pdf close; R

RE: [R] nls question

2004-12-16 Thread christian_mora
Mike nlsList from nlme library can fit nonlinear models for dataset grouped by some specification, e.g. by specie in your case Regards Christian -- Mensaje Original -- From: Mike Saunders [EMAIL PROTECTED] To: R Help [EMAIL PROTECTED] Date: Thu, 16 Dec 2004 10:40:00 -0500 Subject: [R] nls

[R] na.omit argument in gls()

2004-12-16 Thread Satoshi Takahama
Hello everyone, I was wondering if someone could tell me what happens when you use na.omit in the gls() function in library(nlme) when you assume a correlation structure for the errors: gls(Y ~ X1 + X2 + X3, data=sample.data, na.action=na.omit, correlation=corARMA(p=1)) Is na.omit is an

[R] Unsightly lines from x*y grid in levelplot with Postscript

2004-12-16 Thread Waichler, Scott R
When I generate levelplot figures with Postscript, the lines from the underlying grid (i.e., the x and y in z ~ x* y) show up as faint white lines in the output. If I have a dense grid, the lines wash out the contour colors. I can avoid the problem if I use png instead, but that brings up other

Re: [R] drawing a rectangle through multiple plots

2004-12-16 Thread Greg Snow
Attached is a file with the definition of a function (cnvrt.coords) that can just be sourced into R. This function will convert between the different coordinate systems. The basic usage for your problem is: 1. draw first plot 2. convert the y-value for the top of your rectangle from the current

Re: [R] Unsightly lines from x*y grid in levelplot with Postscript

2004-12-16 Thread Deepayan Sarkar
On Thursday 16 December 2004 12:57, Waichler, Scott R wrote: When I generate levelplot figures with Postscript, the lines from the underlying grid (i.e., the x and y in z ~ x* y) show up as faint white lines in the output. If I have a dense grid, the lines wash out the contour colors. I can

Re: [R] Unsightly lines from x*y grid in levelplot with Postscript

2004-12-16 Thread Paul Murrell
Hi Waichler, Scott R wrote: When I generate levelplot figures with Postscript, the lines from the underlying grid (i.e., the x and y in z ~ x* y) show up as faint white lines in the output. If I have a dense grid, the lines wash out the contour colors. I can avoid the problem if I use png

[R] reading svm function in e1071

2004-12-16 Thread Rajdeep Das
Hi, If I try to read the codes of functions in e1071 package, it gives me following error message. library(e1071) svm function (x, ...) UseMethod(svm) environment: namespace:e1071 predict.svm Error: Object predict.svm not found Can someone help me on this how to read the codes of the

Re: [R] reading svm function in e1071

2004-12-16 Thread Roger D. Peng
The predict method for class `svm' is hidden in a namespace. Try getS3method(predict, svm) -roger Rajdeep Das wrote: Hi, If I try to read the codes of functions in e1071 package, it gives me following error message. library(e1071) svm function (x, ...) UseMethod(svm) environment:

FW: [R] Unsightly lines from x*y grid in levelplot with Postscript

2004-12-16 Thread Waichler, Scott R
One typical problem with gv is that some artifacts show up (which may not be what you describe) when the display is anti-aliased. Try turning that off (by pressing 'a') and see if that improves the display. If you produce PDF, it's possible to just turn off antialiasing for line art,

RE: [R] Advice on parsing formulae

2004-12-16 Thread Thomas Lumley
On Thu, 16 Dec 2004, Claus Dethlefsen wrote: Thank you for the advice. I have now boiled my problem down to the following: How do I create fm2 from fm1 ? fm1 - Y ~ 1 + tvar(x:A) + tvar(z) + u + tvar(B) + tvar(poly(v,3)) fm2 - Y ~ 1 + x:A + z + u + B + poly(v, 3) Thus, how do I simply remove

Re: [R] counting numbers without replicates in a vector

2004-12-16 Thread Ray Brownrigg
I am just wondering if there is an easy way to count in a numeric vector how many numbers don't have replicates. For example, a=c(1,1,2,2,3,4,5), how can I know there are three numbers (3, 4 and 5) without replicates? How about: length(table(a)[table(a) == 1]) ? Ray Brownrigg

Re: [R] counting numbers without replicates in a vector

2004-12-16 Thread Marc Schwartz
On Thu, 2004-12-16 at 13:40 -0800, Jun Ding wrote: Hi, I am just wondering if there is an easy way to count in a numeric vector how many numbers don't have replicates. For example, a=c(1,1,2,2,3,4,5), how can I know there are three numbers (3, 4 and 5) without replicates? Thank you!

[R] Problem with SVM and scaling

2004-12-16 Thread Ton van Daelen
Hi all -   I am running into a problem with the SVM() method when applying it to data sets that have descriptors with zero variance. Here is the sequence of events: 1. I split my data set with 512 descriptors in a training and test set 2. I build an SVM model for the training set. Out of 512

[R] (no subject)

2004-12-16 Thread Briggs, Meredith M
__ [EMAIL PROTECTED] 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: [R] partial linear model

2004-12-16 Thread Jin Shusong
From: Vito Muggeo [EMAIL PROTECTED] Subject: R: [R] partial linear model Date: Thu, 16 Dec 2004 17:25:35 +0100 Dear Jin, if you mean `conditional linearity', (i.e. given the nonlinear parameter, the model is linear) you can use nls() with algorithm = plinear. See ?nls Alternatively, if your

RE: [R] counting numbers without replicates in a vector

2004-12-16 Thread Liaw, Andy
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard Sent: Thursday, December 16, 2004 5:43 PM To: Ray Brownrigg Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [R] counting numbers without replicates in a vector Ray

[R] RE: How about a mascot for R?

2004-12-16 Thread Andrew Ward
Apologies for adding to this discussion so late. When the idea of a mascot was first raised, I recalled how in describing (and spelling) R to people in seminars, etc I would sometimes say, in my best pirate voice, That's R, as in ARR!. The connection to something or someone criminal is

Re: [R] RE: How about a mascot for R?

2004-12-16 Thread Sundar Dorai-Raj
Marc Schwartz wrote: On Fri, 2004-12-17 at 12:32 +1000, Andrew Ward wrote: Apologies for adding to this discussion so late. When the idea of a mascot was first raised, I recalled how in describing (and spelling) R to people in seminars, etc I would sometimes say, in my best pirate voice, That's

[R] 3 questions

2004-12-16 Thread vasilis pappas
Hello R users, I have three questions and I would be grateful if someone could give me an answer to each of these. 1) I have constracted a function that returns an output, which runs in a while( condition ){ run function } loop. I would like to know if there is a way to get the outputs

RE: [R] Advice on parsing formulae

2004-12-16 Thread Claus Dethlefsen
Thank you for the advice. I have now boiled my problem down to the following: How do I create fm2 from fm1 ? fm1 - Y ~ 1 + tvar(x:A) + tvar(z) + u + tvar(B) + tvar(poly(v,3)) fm2 - Y ~ 1 + x:A + z + u + B + poly(v, 3) Thus, how do I simply remove tvar( * ) from a formula? Do I have to write a

[R] [R-pkgs] Building of Windows binary packages for R-1.9.x has been stopped

2004-12-16 Thread Uwe Ligges
Dear useRs, automatical building of contributed Windows binary packages for R-1.9.x has been stopped. The last known good versions of contributed packages are available in the repository: These may be outdated versions, because new versions of many packages already require R=2.0.0. Upgrading to

[R] Detecting incomplete commands

2004-12-16 Thread Philippe Grosjean
Hello, I need a similar behaviour as with the prompt: asking to complete incomplete R command with eval(parse(text = )) Is it a way to make the difference between an illegal and an incomplete R command in a string? For instance: parse(text=ls()) expression(ls()) This is fine!

RE: [R] help with multiple imputation using imp.mix

2004-12-16 Thread Ted Harding
Hi Jens, On 16-Dec-04 Jens Hainmueller wrote: I am desperately trying to impute missing data using 'imp.mix' but always run into this yucky error message to which I cannot find the solution. It's the first time I am using mix and I'm trying really hard to understand, but there's just this

[R] Incorrect permissions to edit database package

2004-12-16 Thread michael watson \(IAH-C\)
Hi I am running R 2.0 on Suse Linux 8.2. I get an error message when loading a library: Incorrect permissions to edit the package database, /usr/lib/R/library/liblisting.Rda: save.locLib(locLibList, curLib) However, when I look at that file, the user I am running R as has r and w permissions

[R] (D)COM unknown (internal) error

2004-12-16 Thread Jonathan White
Hello All, I'm getting the error message unknown (internal) error when evaluating the following string source('j:/tmp/test.r') via the (D)COM server. The script test.r is run and everything works, but Evaluate still returns this error. I can avoid the error by using EvaluateNoReturn, but

RE: [R] Advice on parsing formulae

2004-12-16 Thread Heather Turner
Okay, well you could define a tvar function as follows tvar - function(term) term Then stick to fm1 X - model.matrix(fm1,keep.order=TRUE) pAssign - attr(X, assign) tvar.terms - terms( fm1, specials = tvar,keep.order=TRUE ) idx - attr(tvar.terms,specials)$tvar if (attr(tvar.terms,response)) idx -

Re: [R] Detecting incomplete commands

2004-12-16 Thread Thomas Petzoldt
Philippe Grosjean wrote: Hello, I need a similar behaviour as with the prompt: asking to complete incomplete R command with eval(parse(text = )) Is it a way to make the difference between an illegal and an incomplete R command in a string? For instance: parse(text=ls()) expression(ls()) This

Re: [R] PL/R calls fail

2004-12-16 Thread Joe Conway
Stefan Sobernig wrote: I am currently trying to create a development environment including PostgreSQL 8.0.0rc1, R 2.0.1 and PL/R on a system running Fedora Cora 1. So far, I have suceeded in setting up PostgreSQL and R as a shared library - unfortunately I have not been able to link these two

[R] nls question

2004-12-16 Thread Mike Saunders
Just a quick question. Is there a way to easily specify factor levels in a function definition within nls? For example, I am trying to fit a 3 parameter, nonlinear Weibull function to tree height and I would like to have results by species (or down the road a bit, by plot). I am hoping there

[R] PHP MySQL and R

2004-12-16 Thread Samuel A Mati
Hello everyone, this is my first post. Nice to meet all of you. I am having some troubles using R in combination with PHP and MySQL. I would appreciate any assistance very much! This is kind of long, so if you'd like a shorter version let me know. I am working on a project that takes a

Re: [R] Detecting incomplete commands

2004-12-16 Thread Brian D Ripley
On 16 Dec 2004, Peter Dalgaard wrote: Philippe Grosjean [EMAIL PROTECTED] writes: Thank you Thomas for your answer. This is of course what I intend to do (indeed, to use a tryCatch(), instead of I try(). However, I would like to have a different behaviour depending if the synthax is

R: [R] partial linear model

2004-12-16 Thread Vito Muggeo
Dear Jin, if you mean `conditional linearity', (i.e. given the nonlinear parameter, the model is linear) you can use nls() with algorithm = plinear. See ?nls Alternatively, if your model has just one nonlinear parameter th, say, I think you can write the objective function (for instance the

RE: [R] reading svm function in e1071

2004-12-16 Thread Liaw, Andy
It's in the R FAQ. Try getAnywhere(predict.svm). Andy From: Rajdeep Das Hi, If I try to read the codes of functions in e1071 package, it gives me following error message. library(e1071) svm function (x, ...) UseMethod(svm) environment: namespace:e1071 predict.svm Error:

[R] partial linear model

2004-12-16 Thread Jin Shusong
Dear all, Are there any packages can estimate the partial linear model. Or any one can give me any suggestions. Many thanks in advance. Jin __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] counting numbers without replicates in a vector

2004-12-16 Thread Jun Ding
Hi, I am just wondering if there is an easy way to count in a numeric vector how many numbers don't have replicates. For example, a=c(1,1,2,2,3,4,5), how can I know there are three numbers (3, 4 and 5) without replicates? Thank you! Jun = __

Re: [R] counting numbers without replicates in a vector

2004-12-16 Thread Sundar Dorai-Raj
Jun Ding wrote: Hi, I am just wondering if there is an easy way to count in a numeric vector how many numbers don't have replicates. For example, a=c(1,1,2,2,3,4,5), how can I know there are three numbers (3, 4 and 5) without replicates? How about using ?table: tab - table(a) unq -

Re: [R] counting numbers without replicates in a vector

2004-12-16 Thread Jonathan Baron
On 12/16/04 13:40, Jun Ding wrote: Hi, I am just wondering if there is an easy way to count in a numeric vector how many numbers don't have replicates. For example, a=c(1,1,2,2,3,4,5), how can I know there are three numbers (3, 4 and 5) without replicates? Take a look at unique() --

RE: [R] counting numbers without replicates in a vector

2004-12-16 Thread Berton Gunter
?duplicated and ?unique might be of interest to you ... But I think an easier way is: z-table(a) length(z)-sum(z1) This gives you the count. names(z)[z==1] gives you the actual values (The quotes can be removed by explicitly calling print with argument quote=FALSE) -- Bert Gunter Genentech

Re: [R] counting numbers without replicates in a vector

2004-12-16 Thread Yu Shao
table will probably do. The following is probably is what you want: a - c(1,1,2,2,3,4,5) a.tab - table (a) a.tab a 1 2 3 4 5 2 2 1 1 1 as.vector(which (a.tab == 1)) [1] 3 4 5 Cheers, Yu Jun Ding wrote: Hi, I am just wondering if there is an easy way to count in a numeric vector how many