[R] Building my own R package under Windows

2004-11-05 Thread Lars Schouw
Hi Is there any samples anywhere that shows how to build my own R package for Windows? I read that package manual and well as the FAQ but would prefer to have an example as well. I know I need perl and mingw. Regards Lars Schouw -

Re: [R] Covariance bug in R-1.8.0

2004-11-05 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: R-1.8.0 seems to calculate wrong covariances, when the argument of cov() is a matrix or a data frame. The following should produce a matrix of zeroes and NaNs: ... Under 1.9.1 (Linux) and 1.9.0 (Windows) i get the expected matrix of zeroes and NaNs. This example

Re: [R] Recovering R Workspace

2004-11-05 Thread Bjørn-Helge Mevik
You probably don't need to re-install R; just remove or rename the file .RData (it is probably located in your home directory (or My Documents on MSWin). Then R should start without problems. As for recovering the workspace, I believ that is a lost cause (unless you study the file format and use

Re: [R] Building my own R package under Windows

2004-11-05 Thread Prof Brian Ripley
On Fri, 5 Nov 2004, Lars Schouw wrote: Hi Is there any samples anywhere that shows how to build my own R package for Windows? I read that package manual and well as the FAQ but would prefer to have an example as well. I know I need perl and mingw. 1) Read README.packages,

[R] bootstrap query

2004-11-05 Thread Silvia Kirkman
Hi I need to bootstrap a function in R and I am struggling. Can anyone help? The following explains what I’m trying to do: I have 2 different matrices, called “x” and “y”. Each has 34 columns, and the length of each column varies. I use this data to determine a certain measure (C), which I’ve

[R] Sweave and transparent PDF?

2004-11-05 Thread Benno Pütz
Hello, I have run across the following problem: Creating PDF files manually by using pdf(version='1.4') I can make graphs using the new transparency feature of R2.0. If, however, I try to create the same graphs with Sweave, all transparent stuff is gone. This os likely due to the default version

[R] Error message from vignette strucchange-intro example

2004-11-05 Thread Thomas Schnhoff
Hello, I am just studying the following example from vignette: strucchange-intro, contineousely ending up in an error. This is the given code: 1. library(strucchange) 2. data(USIncExp) 3. if (!package:stats %in% search()) library(ts) 4. USIncExp2 - window(USIncExp, start = c(1985, 12))

[R] Creating .Rout.save files for package subdirectory tests

2004-11-05 Thread Arne Henningsen
Hi, I added the tests subdirectory and a test file (say myTest.R) to our systemfit package. Up to now I create the myTest.Rout.save file with R CMD BATCH --vanilla myTest.R myTest.Rout.save However, R CMD check reports two differences between myTest.Rout.save and the output of myTest.R: a)

Re: [R] calling a var by name in another var

2004-11-05 Thread Adaikalavan Ramasamy
get(myvar1) + get(myvar2) [1] 295 411 230 On Thu, 2004-11-04 at 13:58, Oskar Villani wrote: Hello list, I'd like to use a variable (or a column of a data frame) by using its name as a string. E.g.: Data2003 - c(150,200,120) Data2004 - c(145,211,110) myvar1 - Data2003 myvar2 -

[R] I: a coloured band within each panel of a lattice bwplot

2004-11-05 Thread 8rino-Luca Pantani
Hi all, I would like to add to each panel of a bwplot a coloured central band, centered on the mean of the values, being its width +- 2% of the mean itself. I know how to add lines, i.e. something like bwplot(X ~ Y|FACTOR data=my.df, panel= function(x, y){ panel.bwplot(x,

Re: [R] Creating .Rout.save files for package subdirectory tests

2004-11-05 Thread Martin Maechler
Arne == Arne Henningsen [EMAIL PROTECTED] on Fri, 5 Nov 2004 11:56:02 +0100 writes: Arne Hi, I added the tests subdirectory and a test file Arne (say myTest.R) to our systemfit package. Up to now Arne I create the myTest.Rout.save file with R CMD BATCH --vanilla myTest.R

Re: [R] Creating .Rout.save files for package subdirectory tests

2004-11-05 Thread Prof Brian Ripley
On Fri, 5 Nov 2004, Arne Henningsen wrote: I added the tests subdirectory and a test file (say myTest.R) to our systemfit package. Up to now I create the myTest.Rout.save file with R CMD BATCH --vanilla myTest.R myTest.Rout.save However, R CMD check reports two differences between

Re: [R] Sweave and transparent PDF?

2004-11-05 Thread Friedrich . Leisch
On Thu, 04 Nov 2004 14:20:21 +0100, Benno Pütz (BP) wrote: Hello, I have run across the following problem: Creating PDF files manually by using pdf(version=1.4) I can make graphs using the new transparency feature of R2.0. If, however, I try to create the same graphs with

Re: [R] Creating .Rout.save files for package subdirectory tests

2004-11-05 Thread Arne Henningsen
Thank you, Martin and Prof. Ripley, for your very helpful answers! It would be nice if this could be mentioned in section 1.1.4 of the Writing R Extensions manual. Arne On Friday 05 November 2004 12:17, Martin Maechler wrote: Arne == Arne Henningsen [EMAIL PROTECTED] on Fri, 5 Nov 2004

Re: [R] biplot drawing conc ellipses

2004-11-05 Thread Jari Oksanen
On Thu, 2004-11-04 at 22:44, T. Murlidharan Nair wrote: Is there an option to draw concentration ellipses in biplots ? It seems really nice to summarize large number of points of each group. Murli, If you mean biplot.prcomp function in stats package, and you want to draw the concentration

[R] Question about RSQLite

2004-11-05 Thread Faerber, Franz
I've installed RSQLite with version 1.9.1 When calling m-dbDriver(SQLite) I get the error message Invalid names for slots of class SQLiteDriver: Id Whats my mistake? Thx - franz __ [EMAIL PROTECTED] mailing list

[R] Problems with the sort function!?

2004-11-05 Thread Kay Pilz
Hello All. I am running R 2.0.0 with a Win XP operating system. The same problem occured with R 1.9.1 but not with R.1.3.1 on a Win NT computer. My request is about the following problem with the sort function: The vector price is a vector of 789 asset prices of the following form,

Re: [R] Problems with the sort function!?

2004-11-05 Thread Adaikalavan Ramasamy
x - 1.0001 all.equal(x, 1) [1] TRUE x == 1 [1] FALSE Reading help(all.equal) will tell you that the tolerance level by default is around 1.490116e-08. On Fri, 2004-11-05 at 13:48, Kay Pilz wrote: Hello All. I am running R 2.0.0 with a Win XP operating system. The same problem occured

Re: [R] Problems with the sort function!?

2004-11-05 Thread Peter Dalgaard
Kay Pilz [EMAIL PROTECTED] writes: Hello All. I am running R 2.0.0 with a Win XP operating system. The same problem occured with R 1.9.1 but not with R.1.3.1 on a Win NT computer. My request is about the following problem with the sort function: ... Taking the difference of the first two

[R] smooth.spline _df_ parameter?

2004-11-05 Thread Wolski
Hi, I am usign the smooth.spline function. I am not sure how the _df_ (degrees of freedom) parameter, if set, influences _lambda_ in eq: L = (y - f)' W (y - f) + lambda c' Sigma c Is _df_ substituting tr(Sigma), if defined, in the equation: r = tr(X' W X) / tr(Sigma), which is used to

[R] (no subject)

2004-11-05 Thread Xin Qi
Dear all R users and helpers: I wonder whether there is a library call trees ( classification trees) in R? If there is, where can download it? Thank you very much. Xin Qi __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] (no subject)

2004-11-05 Thread Thomas Lumley
On Fri, 5 Nov 2004, Xin Qi wrote: Dear all R users and helpers: I wonder whether there is a library call trees ( classification trees) in R? If there is, where can download it? No, there isn't. However, there is a package called tree that you can download from CRAN and another called rpart

[R] pmin behavior change in 2.0.0

2004-11-05 Thread Brian Bielinski
Hi, In 2.0.0 the behavior of pmin has changed. It stops now with an error if all the elements at a particular point are NA. These examples were run on windows xp, but the behavior for 2.0.0 is the same on linux. R 1.9.1 pmin(c(1,NA,3),c(1,NA,2)) [1] 1 NA 2 pmin(c(1,NA,3),c(1,2,2)) [1] 1

[R] Lda versus Rda

2004-11-05 Thread Julien Trolet
Hello, I used the lda function from the MASS (VR) package and the rda function from the klaR package. I wanted to compare the result of this two functions by using the same training set. Thus, I used the rda function with lambda=1 an gamma=0, I should emulate the lda function and I should

Re: [R] (no subject)

2004-11-05 Thread Adaikalavan Ramasamy
Check http://cran.r-project.org/src/contrib/PACKAGES.html. AFAIK, there is tree, rpart and knnTree. The simplest wat to install, say the package tree, is to type in install.packages(tree) in the R command line. On Fri, 2004-11-05 at 15:07, Xin Qi wrote: Dear all R users and helpers: I

[R] any function for jackknife validation

2004-11-05 Thread rongguiwong
i want to using jackknife validation for a small sample to the PCA.is there any function for jacknife?i know splus has ,but i can not find in R. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] graphics site

2004-11-05 Thread Gabor Grothendieck
Michaell Taylor Michaell.Taylor at boxwoodmeans.com writes: : : About six months ago there was a reference to a site (in french) that : did a spectacular job of demonstrating R's graphical capabilities. : : My bookmarks were recently wiped and I cannot find this site despite my : best googling.

Re: [R] Error message from vignette strucchange-intro example

2004-11-05 Thread Achim Zeileis
Thomas: I am just studying the following example from vignette: strucchange-intro, With problems like this, please contact the package maintainer, or at least Cc. contineousely ending up in an error. This is the given code: 1. library(strucchange) 2. data(USIncExp) 3. if

Re: [R] pmin behavior change in 2.0.0

2004-11-05 Thread Prof Brian Ripley
This is fixed in 2.0.1 beta that is currently available for testing. It was a bug in pmin that went undetected until things were tightened up. [More precisely, pmin used an undefined construction, NA subscripts on the LHS of an assignment, that was not implemented consistently.] Interestingly

Re: [R] pmin behavior change in 2.0.0

2004-11-05 Thread Thomas Lumley
On Fri, 5 Nov 2004, Brian Bielinski wrote: Hi, In 2.0.0 the behavior of pmin has changed. It stops now with an error if all the elements at a particular point are NA. Yes. This has already been fixed in r-patched. -thomas __ [EMAIL PROTECTED]

Re: [R] I: a coloured band within each panel of a lattice bwplot

2004-11-05 Thread Deepayan Sarkar
On Friday 05 November 2004 05:05, 8rino-Luca Pantani wrote: Hi all, I would like to add to each panel of a bwplot a coloured central band, centered on the mean of the values, being its width +- 2% of the mean itself. I know how to add lines, i.e. something like bwplot(X ~ Y|FACTOR

[R] Resources for optimizing code

2004-11-05 Thread Janet Elise Rosenbaum
I want to eliminate certain observations in a large dataframe (21000x100). I have written code which does this using a binary vector (0=delete obs, 1=keep), but it uses for loops, and so it's slow and in the extreme it causes R to hang for indefinite time periods. I'm looking for one of two

Re: [R] Resources for optimizing code

2004-11-05 Thread Roger Bivand
On Fri, 5 Nov 2004, Janet Elise Rosenbaum wrote: I want to eliminate certain observations in a large dataframe (21000x100). I have written code which does this using a binary vector (0=delete obs, 1=keep), but it uses for loops, and so it's slow and in the extreme it causes R to hang for

Re: [R] Resources for optimizing code

2004-11-05 Thread Prof Brian Ripley
On Fri, 5 Nov 2004, Janet Elise Rosenbaum wrote: I want to eliminate certain observations in a large dataframe (21000x100). I have written code which does this using a binary vector (0=delete obs, 1=keep), but it uses for loops, and so it's slow and in the extreme it causes R to hang for

Re: [R] Resources for optimizing code

2004-11-05 Thread Prof Brian Ripley
On Fri, 5 Nov 2004, Roger Bivand wrote: On Fri, 5 Nov 2004, Janet Elise Rosenbaum wrote: I want to eliminate certain observations in a large dataframe (21000x100). I have written code which does this using a binary vector (0=delete obs, 1=keep), but it uses for loops, and so it's slow

Re: [R] graphics site

2004-11-05 Thread Pierre BADY
hi, you can see these links: http://pbil.univ-lyon1.fr/R/enseignement.html http://zoonek2.free.fr/UNIX/48_R/all.html http://www.ceremade.dauphine.fr/~xian/Noise.html http://statwww.epfl.ch/davison/teaching/ProbStat/20032004/PDF http://www.ulb.ac.be/di/map/gbonte/mod_stoch perhaps the site you

Re: [R] Resources for optimizing code

2004-11-05 Thread Tony Plate
Have you tried reading the manual An Introduction to R, with special attention to Array Indexing (indexing for data frames is pretty similar to indexing for matrices). Unless I'm misunderstanding, what you want to do is very simple. It is possible to use numeric vectors with 0 and 1 to

[R] Problems running a 4-parameter Weibull function with nls

2004-11-05 Thread Mike Saunders
Hi, I am rather new to R, but both myself and another much more experience user cannot figure this out. I have a collegue who has a 800+ nonlinear regressions to run for seed germination (different species, treatments, etc.) over time. I created a looping structure to extract the parameters

[R] text colour in legend

2004-11-05 Thread Marcus Leinweber
hello, the following example gives a plot with a legend: plot(-10:10,-10:10,type=n) x=1:10 y=1:10 tt=c(A,B,C,D,E,F) text(x,y,tt,cex=.8) legend(-10,10,paste(tt, ,x,y),text.col=c(2:4)) # each row in different colour but how can I colour the legend text by column meaning tt in red, x in blue

[R] [R-pkgs] dichromat package

2004-11-05 Thread Thomas Lumley
This is an update (version 1.2), not a new package, but given recent postings on the R lists an announcement may be helpful. The 'dichromat' package has color schemes designed for people with red-green deficient or anomalous vision, tools for simulating the effect of color blindness, and tools

[R] R check passes code and docs that don't match

2004-11-05 Thread Ross Boylan
I have code and documentation that don't match, but R CMD check didn't flag it. in mspath.R mspath - function(formula, # formula with observed Markov states ~ observation times (required) qmatrix,# matrix of 1s and 0s with indices of allowed transitions (diagonal is

Re: [R] Problems running a 4-parameter Weibull function with nls

2004-11-05 Thread Spencer Graves
Might nls be testing values for lag that exceed min(X)? That might produce the error you observe. I routine reparameterize problems like this to send boundaries to Inf, e.g.: x0 - min(df$X) fit-nls(Y ~ max.*(1 -

[R] fast partial spectral decompositions.

2004-11-05 Thread Jon McAuliffe
hello, i want to compute the top k eigenvalues+eigenvectors of a (large) real symmetric matrix. since it doesn't look like any top-level R function does this, i'll call LAPACK from a C shlib and then use .Call. the only LAPACK function i see to do this in R_ext/Lapack.h is dsyevx. however, i know

Re: [R] text colour in legend

2004-11-05 Thread Marc Schwartz
On Fri, 2004-11-05 at 12:57, Marcus Leinweber wrote: hello, the following example gives a plot with a legend: plot(-10:10,-10:10,type=n) x=1:10 y=1:10 tt=c(A,B,C,D,E,F) text(x,y,tt,cex=.8) legend(-10,10,paste(tt, ,x,y),text.col=c(2:4)) # each row in different colour but how

[R] R usage -- for article

2004-11-05 Thread Seth Grimes
Hello all, I write a decision-support column for a computing magazine, Intelligent Enterprise. In my next column, I'll be revisiting a topic I wrote on 3 years ago, open-source analytical software. R is perhaps the most successful open-source analytical package. I'd like to

Re: [R] R usage -- for article

2004-11-05 Thread partha_bagchi
For me, it is extremely easy to integrate R into a webserver where Scientists perform preprogrammed analyses and get the report they want. This integration with a web server I found to be not so easy with other software. Also, the graphical capabilities of R are unsurpassed. Seth Grimes

Re: [R] highly biased PCA data?

2004-11-05 Thread John Maindonald
I'd suggest you start by using lda() or qda() from MASS, benefits being that (a) if the frequencies in the sample do not reflect the frequencies in the target population, you can set 'prior' to mirror the target frequencies. The issue is, perhaps, is your odd person odd in a 1000 dog : 100 cat

[R] how to read this matrix into R

2004-11-05 Thread rongguiwong
the following the the lower.tri matrix in a file named luxry.car and i want to read it in R as a lower.tri matrix.how can i do? i have try to use help.search(read),but no result what i want. 1.000 0.591 1.000

Re: [R] how to read this matrix into R

2004-11-05 Thread Spencer Graves
How about the following: a - scan(clipboard) Read 45 items n2 - length(a) n - (-1+sqrt(1+8*n2))/2 A - array(NA, dim=c(n,n)) A[lower.tri(A,diag=TRUE)] - a A [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 1.000NANANANANANANA NA [2,] 0.591

Re: [R] how to read this matrix into R

2004-11-05 Thread Peter Dalgaard
rongguiwong [EMAIL PROTECTED] writes: the following the the lower.tri matrix in a file named luxry.car and i want to read it in R as a lower.tri matrix.how can i do? i have try to use help.search(read),but no result what i want. Here's one way: x - scan() 1: 1.000 2: 0.591 1.000 4:

Re: [R] how to read this matrix into R

2004-11-05 Thread Gabor Grothendieck
rongguiwong 0034058 at fudan.edu.cn writes: : the following the the lower.tri matrix in a file named luxry.car : and i want to read it in R as a lower.tri matrix.how can i do? : i have try to use help.search(read),but no result what i want. : : 1.000