[R] A bug report?

2004-04-14 Thread Ernst Hansen
Ajay Shah writes: > buoyancy <- function(year, taxbase, tax, description, plotname) { > cat("Simple full OLS regression with all data:\n") > logtax = log(tax) > logtaxbase = log(taxbase) > m = lm(logtax ~ logtaxbase) > summary.lm(m) > details = summary.lm(m) > } > This program

[R] Not a bug - Was: [R] A bug report?

2004-04-14 Thread Jason Turner
Ajay Shah wrote: where it is asif the summary.lm(m) statement never occurred. If I put in a statement print(m) it works, but the summary.lm(m) does not work. Now here's what's weird: Suppose I remove the statement that comes AFTER this summary.lm(m) statement. That is, I don't say details = sum

Re: [R] Use R function in C code

2004-04-14 Thread James Wettenhall
Hi, On Fri Apr 2, xt_wang wrote: > I want to use R function Matrix inverse in my c code, please > tell me how I can. > If there is a sample which can tell me how it works. It will > be fantastic. A good place to start learning how to interface R with C is the "Writing R Extensions" manual inst

[R] In-sample / Out-of-sample using R

2004-04-14 Thread Ajay Shah
I'm trying to learn how to use R to: * Make a random partition of a data frame between in-sample and out-of-sample * Estimate a model (e.g. lm()) for the in-sample * Make predictions for all observations * Compare the in-sample error sigma against the out-of-sample error sigma.

[R] A bug report?

2004-04-14 Thread Ajay Shah
Folks, I have a strange situation, which I may have isolated as a bug report. Or, it could just be that there's something about R that I don't know. :-) I have attached the data file and the program file but don't know whether these attachments will make it into the list. Here is my bugreport.R pr

RE: [R] Non-Linear Regression Problem

2004-04-14 Thread Christian Mora
Working on the same idea, Ive generated a data grid with 4 vars, two of them with its own sequence and two with fixed values. As Spencer pointed out one option is to get the values from a simple loop. My question is: How can jump from one set of starting values to the next (on the data grid) in cas

RE: [R] conditional import in NAMESPACE

2004-04-14 Thread Liaw, Andy
> From: Douglas Bates [mailto:[EMAIL PROTECTED] On > > "Liaw, Andy" <[EMAIL PROTECTED]> writes: > > > Can some one tell me if it's possible to have conditional > importFrom() in > > the package NAMESPACE file? Basically I'd like to know if > it's possible to > > make the NAMESPACE file compat

Re: [R] conditional import in NAMESPACE

2004-04-14 Thread Douglas Bates
"Liaw, Andy" <[EMAIL PROTECTED]> writes: > Can some one tell me if it's possible to have conditional importFrom() in > the package NAMESPACE file? Basically I'd like to know if it's possible to > make the NAMESPACE file compatible with R 1.9.0 and those 1.8.1 and earlier. > The problem is that I

Re: [R] trend turning points

2004-04-14 Thread kjetil
On 14 Apr 2004 at 19:24, Achim Zeileis wrote: > On Wed, 14 Apr 2004 19:05:32 +0200 Joerg Schaber wrote: > > > Hi, > > > > does anybody know of a nice test to detect trend turning points in > > time series? Possibly with reference? > > You can look at the function breakpoints() in the package st

[R] conditional import in NAMESPACE

2004-04-14 Thread Liaw, Andy
Dear R-help, Can some one tell me if it's possible to have conditional importFrom() in the package NAMESPACE file? Basically I'd like to know if it's possible to make the NAMESPACE file compatible with R 1.9.0 and those 1.8.1 and earlier. The problem is that I want to import cmdscale(), which is

Re: [R] again question about nmath/standalone

2004-04-14 Thread Dirk Eddelbuettel
Maggie, Are you sure you actually _have_ a library libRmath available to your linker? Below is a full log of how this works on any given Debian system for which we provide the library in a package r-mathlib. Once that is installed, you should be set. Hth, Dirk [EMAIL PROTECTED]:/usr/share/do

Re: [R] poisson repeated meassures

2004-04-14 Thread Jason Turner
Liliana Forzani wrote: Dear R users: I try to use GEE or glmm or glmmML for poisson data but since I have DOUBLE repeated meassure I could not use those. Is there something in R for double repeated meassure for nonnormal data? Jim Lindsey has a few packages for this. http://alpha.luc.ac.be/~jlinds

Re: [R] Weird Error

2004-04-14 Thread Douglas Bates
Bret Collier <[EMAIL PROTECTED]> writes: > I hope this is not a uniformed question, but I am a little lost. > > I ran into a problem this morning and I was wondering if anyone had > seen it before. I was trying to summarize each column of a data set > (150,000 rows, ~50mb, so it was a relatively

[R] again question about nmath/standalone

2004-04-14 Thread xt_wang
Hello, I forgot to tell you that I am using Linux OS. And I can’t find directory “src/nmath/standalone”. I will send you the test code I am using and the whole operation process. [EMAIL PROTECTED] ~/src]$ gcc test1.c -o test1 -lRmath test1.c: In function `main': test1.c:18: warning: assignment

[R] poisson repeated meassures

2004-04-14 Thread Liliana Forzani
Dear R users: I try to use GEE or glmm or glmmML for poisson data but since I have DOUBLE repeated meassure I could not use those. Is there something in R for double repeated meassure for nonnormal data? thansk. Liliana Forzani __ [EMAIL PROTECTED] ma

[R] Uninstalling RAqua (Mac OSX)

2004-04-14 Thread Gonçalo Ferraz
I wrote some R code that runs just fine on a friend's RAqua (MacOSX) but will never run on mine. This made me think there could have been a problem with my installation or version, so I went to http://cran.r-project.org/bin/macosx/ and downloaded the RAqua.dmg file (version 1.8.1) I upgraded RAqu

Re: [R] Re: [BioC] Makefile for installing all available packages

2004-04-14 Thread Kasper Daniel Hansen
On Wed, Apr 14, 2004 at 12:28:23PM -0400, Jonathan Baron wrote: > On 04/14/04 11:42, Duncan Murdoch wrote: > >On Wed, 14 Apr 2004 17:07:42 +0200, Kasper Daniel Hansen > ><[EMAIL PROTECTED]> wrote : > >>You do not find it a bit overkill to install all of CRAN per default? > > > >I can see two situat

Re: [R] dataframe: visualization as tiles(?)

2004-04-14 Thread Itay Furman
Thanks, but no. In the method that I remember the plot was an assortment of oblong(?) tiles, optionally color coded, and filling a square region. According to my recollection it was possilbe to add more variables, in which case each tile is broken down further into sub-tiles. Itay

Re: [R] prcomp - error code 18

2004-04-14 Thread Jason Turner
Laura Quinn wrote: I am attempting to perform a pca on a data frame of dimension 5000x19, but when I execute pcapres<-prcomp(pres,center=TRUE) the following error message is returned: Error in La.svd(x, nu, nv, method) : error code 18 from Lapack routine dgesdd Where am I going wrong? I am runni

Re: [R] ltext, plotmath, and substitute

2004-04-14 Thread Deepayan Sarkar
On Wednesday 14 April 2004 11:13 am, Dave Atkins wrote: > I am interested to use plotmath functions within a panel function but am > having some problems getting the code right. Within each panel I am > plotting the data, fitting a regression line, and would like to print the > regression equation

Re: [R] Variable Descriptors

2004-04-14 Thread Frank E Harrell Jr
On Wed, 14 Apr 2004 15:50:51 -0400 "Zodet, Marc" <[EMAIL PROTECTED]> wrote: > Is there a way to associate text descriptions with variables in a > data.frame? > > > > For example... > > > > Let's say that in my data.frame I have a variable named var1. var1 > represents the responses to the

[R] Variable Descriptors

2004-04-14 Thread Zodet, Marc
Is there a way to associate text descriptions with variables in a data.frame? For example... Let's say that in my data.frame I have a variable named var1. var1 represents the responses to the question "When was the last time you saw your physician?" When I tabulate the variable var1 I'd l

Re: [R] Weird Error

2004-04-14 Thread Peter Dalgaard
Bret Collier <[EMAIL PROTECTED]> writes: > R-Users, > > I hope this is not a uniformed question, but I am a little lost. Don't worry, they all look alike... ;-) > I ran into a problem this morning and I was wondering if anyone had > seen it before. I was trying to summarize each column of a d

RE: [R] attaching data.frame/list within a function

2004-04-14 Thread Gardar Johannesson
Thanks for the code Andy -- there seams to be no 'nice' way to do this. The use of 'with' does not work in the context I'm thinking about (as John Fox suggested to the list, and Douglas Grove personally). Thanks, Gardar At 02:50 PM 4/14/2004 -0400, Liaw, Andy wrote: >What you are asking for do

RE: [R] attaching data.frame/list within a function

2004-04-14 Thread Liaw, Andy
What you are asking for doesn't even work at the R prompt, let alone inside a function. The _really_ ugly kludge I manage to come up with is to manually assign the components of the list (or variables in the data frame) into the function's environment: f <- function(mylist=list(a=1:5)) { nm <

RE: [R] attaching data.frame/list within a function

2004-04-14 Thread John Fox
Dear Gardar, You could use with(); to modify your example slightly, > a <- "a" > b <- 5 > foo <- function(x=0, input=list(a=10)) { + with(input, { + print(c(a, b, x)) + }) + } > foo() [1] 10 5 0 > I hope that this helps, John > -O

[R] attaching data.frame/list within a function

2004-04-14 Thread Gardar Johannesson
I'm trying to find a good way of attaching a list within a function such that the attached variables (the list's members) precede the global environment (.GlobalEnv) in the search list. Here is a non-working example using attach(), which hopefully explains better what I'm trying to do: > foo

[R] Weird Error

2004-04-14 Thread Bret Collier
R-Users, I hope this is not a uniformed question, but I am a little lost. I ran into a problem this morning and I was wondering if anyone had seen it before. I was trying to summarize each column of a data set (150,000 rows, ~50mb, so it was a relatively big file) imported from a text file using

Re: [R] question about /nmath/standalone

2004-04-14 Thread Sundar Dorai-Raj
[EMAIL PROTECTED] wrote: Hello, I can't link a c code with Mathlib according to introduction of R manual “Writing R Extensions”, page 60. It is written : “It is possible to build Mathlib, the R set of mathematical functions documented in ‘Rmath.h’, as a standalone library ‘libRmath’ under Unix

Re: [R] trend turning points

2004-04-14 Thread Achim Zeileis
On Wed, 14 Apr 2004 19:05:32 +0200 Joerg Schaber wrote: > Hi, > > does anybody know of a nice test to detect trend turning points in > time series? Possibly with reference? You can look at the function breakpoints() in the package strucchange and the function segmented() in the package segmented

[R] question about /nmath/standalone

2004-04-14 Thread xt_wang
Hello, I can't link a c code with Mathlib according to introduction of R manual “Writing R Extensions”, page 60. It is written : “It is possible to build Mathlib, the R set of mathematical functions documented in ‘Rmath.h’, as a standalone library ‘libRmath’ under Unix and Windows. (This inclu

RE: [R] trend turning points

2004-04-14 Thread Liaw, Andy
I don't know about time series data, but if the "errors" are independent (and preferably constant variance), wouldn't this amounts to estimating zeroes in the first derivative of the trend? I believe several packages for smoothing (e.g., KernSmooth and locfit) can estimate derivatives. J. S. Marr

[R] trend turning points

2004-04-14 Thread Joerg Schaber
Hi, does anybody know of a nice test to detect trend turning points in time series? Possibly with reference? Thanks, joerg __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http:/

Re: [R] Re: [BioC] Makefile for installing all available packages

2004-04-14 Thread A.J. Rossini
I should mention that this function is more useful after calling update.packages() best, -tony [EMAIL PROTECTED] (A.J. Rossini) writes: > Jonathan Baron <[EMAIL PROTECTED]> writes: > >> On 04/14/04 11:42, Duncan Murdoch wrote: >>>On Wed, 14 Apr 2004 17:07:42 +0200, Kasper Daniel Hansen >>><

Re: [R] Re: [BioC] Makefile for installing all available packages

2004-04-14 Thread A.J. Rossini
Jonathan Baron <[EMAIL PROTECTED]> writes: > On 04/14/04 11:42, Duncan Murdoch wrote: >>On Wed, 14 Apr 2004 17:07:42 +0200, Kasper Daniel Hansen >><[EMAIL PROTECTED]> wrote : >>>You do not find it a bit overkill to install all of CRAN per default? >> >>I can see two situations where this would be

Re: [R] Re: [BioC] Makefile for installing all available packages

2004-04-14 Thread Jonathan Baron
On 04/14/04 11:42, Duncan Murdoch wrote: >On Wed, 14 Apr 2004 17:07:42 +0200, Kasper Daniel Hansen ><[EMAIL PROTECTED]> wrote : >>You do not find it a bit overkill to install all of CRAN per default? > >I can see two situations where this would be desirable: > >On a laptop or other machine that is

Re: [R] Non-Linear Regression Problem

2004-04-14 Thread Douglas Bates
WilDscOp <[EMAIL PROTECTED]> writes: > I was wondering if there is any way i could do a "Grid Search" > on a parameter space using R (as SAS 6.12 and higher can do it) to > start the Newton-Gauss Linearization least squares method when i have > NO prior information about the parameter. > >

Re: [R] Non-Linear Regression Problem

2004-04-14 Thread Spencer Graves
1. For the equation you mentioned, have you considered the following: DF <- data.frame(t.=c(1, 4, 16), Y=c(.8, .45, .04)) # I do NOT use "t" as a name, as it # may conflict with the matrix transpose function. fit0 <- lm(log(Y)~t.-1, DF) fit0 Call: lm(formula = log(Y) ~ t. - 1, data = DF) Coeffic

[R] ltext, plotmath, and substitute

2004-04-14 Thread Dave Atkins
I am interested to use plotmath functions within a panel function but am having some problems getting the code right. Within each panel I am plotting the data, fitting a regression line, and would like to print the regression equation. Here is a trivial example of what I'd like to do: # genera

RE: [R] Complex sample variances

2004-04-14 Thread Fred Rohde
I wasn't sure if JRR or BRR methods were valid for quantiles? I meant to say earlier, survey is a really great package, much better than anything out there. Thanks for developing it. Thomas Lumley <[EMAIL PROTECTED]> wrote: On Wed, 14 Apr 2004, Baskin, Robert wrote: > > This method is basical

[R] odbcFetchRows not work?

2004-04-14 Thread solares
Hi, excuse me i am newbee in R, but i dont understand the following code not work. Libro1.xls have two files and not load in R, under windows. Thanks library(RODBC) > f<-file.choose() > f [1] "C:\\Mis documentos\\ruben\\r19\\Libro1.xls" > help(odbcConnectExcel) > canal<- odbcConnectExcel(f) > can

[R] prcomp - error code 18

2004-04-14 Thread Laura Quinn
I am attempting to perform a pca on a data frame of dimension 5000x19, but when I execute pcapres<-prcomp(pres,center=TRUE) the following error message is returned: Error in La.svd(x, nu, nv, method) : error code 18 from Lapack routine dgesdd Where am I going wrong? I am running R-1.8.0 on Debi

[R] random effect, double repeated measuses

2004-04-14 Thread Liliana Forzani
Hi, I was trying to use GEE or glmmML to fit a poisson model, but my response is double repeated meassure. Does anybody now if there is a way to to this using R? thanks so much Liliana Forzani __ [EMAIL PROTECTED] mailing list https://www.stat.math.et

[R] random effect, double repeated measuses

2004-04-14 Thread Liliana Forzani
Hi, I was trying to use GEE or glmmML to fit a poisson model, but my response is double repeated meassure. Does anybody now if there is a way to to this using R? thanks so much Liliana Forzani __ [EMAIL PROTECTED] mailing list https://www.stat.math.et

Re: [R] Re: [BioC] Makefile for installing all available packages

2004-04-14 Thread Duncan Murdoch
On Wed, 14 Apr 2004 17:07:42 +0200, Kasper Daniel Hansen <[EMAIL PROTECTED]> wrote : >On Tue, Apr 13, 2004 at 10:42:08PM -0400, Warnes, Gregory R wrote: >> Below is a makefile I wrote to download and install all available R packages >> from the CRAN and BioConductor package repositories. > >You

RE: [R] r: arma fitting

2004-04-14 Thread Pfaff, Bernhard
> > hi all > > i would like to model an AR model of the following form: > > y(t) = a + p*y(t-5) + e(t) > Hello Allan, why not simply lm(), such as below? n <- length(y) lm(y[-c(1:5)] ~ y[-c((n-4):n)]) or, alternatively you could restrict coefficients ar(1) to ar(4) to zero by using: arima(

[R] Re: [BioC] Makefile for installing all available packages

2004-04-14 Thread Kasper Daniel Hansen
On Tue, Apr 13, 2004 at 10:42:08PM -0400, Warnes, Gregory R wrote: > Below is a makefile I wrote to download and install all available R packages > from the CRAN and BioConductor package repositories. You do not find it a bit overkill to install all of CRAN per default? -- Kasper Daniel Hansen,

RE: [R] Complex sample variances

2004-04-14 Thread Thomas Lumley
On Wed, 14 Apr 2004, Baskin, Robert wrote: > > This method is basically randomly building BRR replicates (in a 2-per > design) so it is like an inefficient BRR and the number of bootstrap > replicates needed may depend on both the statistic being estimated and the > number of replicates in a fully

RE: [R] R apache and PHP

2004-04-14 Thread marcelloverona
I've solved! The correct way is the full path. Not "R CMD" But "/usr/bla/bla/R CMD ..." Thank you Marcello Verona >We need to know what kind of error message you are getting before we can >be >much help. > >-Greg > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMA

[R] Passing a pointer to .C() in Win32

2004-04-14 Thread James Wettenhall
Hi, Is there any way to pass an integer from R to C and have it cast as a pointer? # Win32 Example: library(tcltk) tt <- tktoplevel() hWndString <- tclvalue(tkwm.frame(tt)) # I'll avoid posting code to this function: source("http://bioinf.wehi.edu.au/folders/james/R/hexStringToDecimalInteger.

Re: [R] Aggregate drops empty subsets

2004-04-14 Thread Andrew Robinson
Hi Sundar, that's excellent - and a very educational answer. Thanks very much! Andrew > > Hi Andrew, > > How about: > > ui <- data.frame(burn = c("low", "high", "low", "low"), > age = c("young", "old", "old", "young"), > junk = c("a", "a", "b", "b")) > ui2

Re: [R] Aggregate drops empty subsets

2004-04-14 Thread Sundar Dorai-Raj
Andrew Robinson wrote: Greetings, R community. I am trying to create a multi-dimensional contingency table suitable for analysis by glm() using the poisson family. I have three factors, each with four levels, with some observed zeros. I'm trying to use aggregate to construct my contingency ta

Re: [R] mvtnorm problems (II)

2004-04-14 Thread Uwe Ligges
"Liaw, Andy" wrote: > > With R-1.9.0 Windows binary downloaded from CRAN, I get: > > > install.packages("mvtnorm") > trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES' > Content type `text/plain; charset=iso-8859-1' length 17545 bytes > opened URL > downloaded 17Kb > > try

Re: [R] mvtnorm problems (II)

2004-04-14 Thread Göran Broström
On Wed, Apr 14, 2004 at 09:40:16AM -0400, Jose A. Andres wrote: > Thanks a lot for your help! > > Obviously I've tried to load it before by using the install.packages > function but it didn't work. This is what I got > > > > install.packages("mvtnorm") > trying URL `http://cran.r-project.org/bin

Re: [R] mvtnorm problems (II)

2004-04-14 Thread Uwe Ligges
"Jose A. Andres" wrote: > > Thanks a lot for your help! > > Obviously I've tried to load it before by using the install.packages > function but it didn't work. This is what I got > > > install.packages("mvtnorm") > trying URL `http://cran.r-project.org/bin/windows/contrib/1.7/PACKAGES' > Conte

RE: [R] Complex sample variances

2004-04-14 Thread Baskin, Robert
< Construct a new weight within the stratum as the sample weight multiplied by the frequency> The correct formula for the new weights can be found in Chapter 6 of Shao and Tu (1996) "The Jackknife and the Bootstrap", Springer Also in: " Keith Rust & Jon Rao have an overview article in Statisti

[R] Aggregate drops empty subsets

2004-04-14 Thread Andrew Robinson
Greetings, R community. I am trying to create a multi-dimensional contingency table suitable for analysis by glm() using the poisson family. I have three factors, each with four levels, with some observed zeros. I'm trying to use aggregate to construct my contingency table, but it drops empty su

RE: [R] mvtnorm problems (II)

2004-04-14 Thread Liaw, Andy
With R-1.9.0 Windows binary downloaded from CRAN, I get: > install.packages("mvtnorm") trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 17545 bytes opened URL downloaded 17Kb trying URL `http://cran.r-project.org/bin/wind

Re: [R] Complex sample variances

2004-04-14 Thread Fred Rohde
I think I've figured out a way to do a bootstrap variance estimate of a quantile. I need to work out the code, but this is the algorithm (for a stratified cluster sample): Make a list of the stratum values for the sample For each stratum value, Make a list of the PSU values within th

[R] mvtnorm problems (II)

2004-04-14 Thread Jose A. Andres
Thanks a lot for your help! Obviously I've tried to load it before by using the install.packages function but it didn't work. This is what I got > install.packages("mvtnorm") trying URL `http://cran.r-project.org/bin/windows/contrib/1.7/PACKAGES' Content type `text/plain; charset=iso-8859-1' len

[R] how to add legend to time series plot

2004-04-14 Thread michael . wolf
Dear all, I would like to add a legend to a time series plot, but cannot get it done. I have searched the archive about this, but to no avail ... I have three sets of time series data stored in a matrix wMat. The following code plots the the data with a legend, but it does not put the time on th

Re: [R] mvtnorm problems

2004-04-14 Thread Uwe Ligges
John Fox wrote: Dear Jose, The mvtnorm package is indeed on CRAN. I'm not sure why you can't find it. John What about simply trying install.packages("mvtnorm") Uwe Ligges -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jose Sent: Wednesday, Apr

RE: [R] mvtnorm problems

2004-04-14 Thread John Fox
Dear Jose, The mvtnorm package is indeed on CRAN. I'm not sure why you can't find it. John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jose > Sent: Wednesday, April 14, 2004 7:41 AM > To: [EMAIL PROTECTED] > Subject: [R] mvtnorm problems > >

[R] mvtnorm problems

2004-04-14 Thread Jose
Hi all! My apologies for posting such a naive question. I've been trying to run multiple comparison contrasts on several GLM models. For doing so I've tried to use the mulcomp CRAN package. However, before I can make the package to work I have to load the mvtnorm package which I cannot find in

[R] Non-Linear Regression Problem

2004-04-14 Thread WilDscOp
Dear all, I was wondering if there is any way i could do a "Grid Search" on a parameter space using R (as SAS 6.12 and higher can do it) to start the Newton-Gauss Linearization least squares method when i have NO prior information about the parameter. W. N. Venables and B. D. Ripley (2002) "Mo

[R] Re: Need advice on using R with large datasets

2004-04-14 Thread Sunny Ho
Thank you guys for sharing your experiences in 64-bit R. Those are very helpful in my planning work. I wonder anyone has experience in using database interface with R. Are there any "preferred" choice or "hidden catch"? In our setup, we may be using MS SQL Server or Oracle to keep the data. I k

[R] r: arma fitting

2004-04-14 Thread allan clark
hi all i would like to model an AR model of the following form: y(t) = a + p*y(t-5) + e(t) where : y(t) is the value of y at time t a is a constant p is the coefficient of the 5th lagged term {e} is a normal error series Any help will be appreciated Allan _

RE: [R] R apache and PHP

2004-04-14 Thread Warnes, Gregory R
We need to know what kind of error message you are getting before we can be much help. -Greg > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Marcello Verona > Sent: Tuesday, April 13, 2004 12:37 PM > To: [EMAIL PROTECTED] > Subject: [R] R apache and PH