Re: [R] how to plot density distribution with a arrow pointer?

2005-06-16 Thread Gabor Grothendieck
, col = "green") : >Object "vf" not found > R>version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major2 > minor1.0 > year 2005 > month04 > day

Re: [R] aggregate?

2005-06-17 Thread Gabor Grothendieck
On 6/17/05, alex diaz <[EMAIL PROTECTED]> wrote: > Dear all: > > Here is my problem: > > Example data: > dat<-data.frame(x=rep(c("a","b","c","d"),2),y=c(10:17)) > > If I wanted to aggregate each level of column dat$x I > could use: > aggregate(dat$y,list(x=dat$x),sum) > > But I just want to agg

Re: [R] Creating a R package for Windows XP

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > You have created a source package, and c:/R/rw2010/library is not the > right place for a source package. You need to move it somewhere else and > INSTALL it, as described in the rw-FAQ. (You need to move it because it > would be installe

Re: [R] plot qda object

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, wu sz <[EMAIL PROTECTED]> wrote: > I use function qda (MASS package) to obtain a qda object, but how to > plot this object? Check out predplot in this file: system.file("scripts/ch12.R", package = "MASS") __ R-help@stat.math.ethz.ch mailin

Re: [R] plot the standard deviation of a specific dot on the figure

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, wu sz <[EMAIL PROTECTED]> wrote: > I plot a curve together with the specific dots on the line, but how to > plot the standard deviation on these dots just as the green bands in > the attached file, and also the purple dotted lines? There is nothing attached. _

Re: [R] plot the deviation of a specific dot on the figure

2005-06-19 Thread Gabor Grothendieck
On 6/19/05, wu sz <[EMAIL PROTECTED]> wrote: > Hello there, > > I plot a curve together with the specific dots on the line, but how to > plot the standard deviation on these dots just as the green bands in > the attached file, and also the purple dotted lines? > There is still no attached file.

Re: [R] RES: another aov results interpretation question

2005-06-20 Thread Gabor Grothendieck
On 6/20/05, Paulo Brando <[EMAIL PROTECTED]> wrote: > > Dear All, > > I created a script to calculate averages - two groups: "parcel" and > "date" - and, based on these averages, make a graph. The problem is that > 'R' does not recognize the first column even if I try to insert one. > > A brief

Re: [R] RES: another aov results interpretation question

2005-06-20 Thread Gabor Grothendieck
On 6/20/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 6/20/05, Paulo Brando <[EMAIL PROTECTED]> wrote: > > > > Dear All, > > > > I created a script to calculate averages - two groups: "parcel" and > > "date" - and, based

Re: [R] How to define S4 methods for '['

2005-06-20 Thread Gabor Grothendieck
On 6/20/05, Berton Gunter <[EMAIL PROTECTED]> wrote: > Folks: > > This is a question about the S4 formal class system. > > Suppose I have a class, 'foo', defined by: > > setClass('foo',representation(dat='matrix', id='character') ) > > I wish to define a '[' method for foo that will extract fro

Re: [R] tapply

2005-06-20 Thread Gabor Grothendieck
On 6/20/05, Weiwei Shi <[EMAIL PROTECTED]> wrote: > hi, > i have another question on tapply: > i have a dataset z like this: > 5540 389100307391 2600 > 5541 389100307391 2600 > 5542 389100307391 2600 > 5543 389100307391 2600 > 5544 389100307391 2600 > 5546 381300302513

Re: [R] nls(): Levenberg-Marquardt, Gauss-Newton, plinear - PI curve fitting

2005-06-21 Thread Gabor Grothendieck
On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote: > Hello, > > i have a problem with the function nls(). > > This are my data in "k": >V1V2 > [1,]0 0.367 > [2,] 85 0.296 > [3,] 122 0.260 > [4,] 192 0.244 > [5,] 275 0.175 > [6,] 421 0.140 > [7,] 603 0.093 > [

Re: [R] nls(): Levenberg-Marquardt, Gauss-Newton, plinear - PI curve fitting

2005-06-21 Thread Gabor Grothendieck
On 6/21/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 6/21/05, Christfried Kunath <[EMAIL PROTECTED]> wrote: > > Hello, > > > > i have a problem with the function nls(). > > > > This are my data in "k": > >V1V2 &

Re: [R] How to define S4 methods for '['

2005-06-21 Thread Gabor Grothendieck
en if correctly typed it doesn't work). I finally > > realized that the "elegant" approach I sought can easily be done without > > setGeneric: > > > setMethod('[','foo',function(x,i,j,drop,...){ > >cl<-as.list(sys.call()) > >

Re: [R] sweep() and recycling

2005-06-21 Thread Gabor Grothendieck
\ Perhaps the signature should be: sweep(...other args go here..., warn=getOption("warn")) so that the name and value of the argument are consistent with the R warn option. On 6/21/05, Robin Hankin <[EMAIL PROTECTED]> wrote: > > On Jun 20, 2005, at 04:58 pm, Prof Brian Ripley wrote: > > > T

Re: [R] R-help

2005-06-21 Thread Gabor Grothendieck
On 6/21/05, McClatchie, Sam (PIRSA-SARDI) <[EMAIL PROTECTED]> wrote: > Background: > OS: Linux Mandrake 10.1 > release: R 2.0.0 > editor: GNU Emacs 21.3.2 > front-end: ESS 5.2.3 > - > Colleagues > > Is there a function in R that is an equivalent of zoom in matlab? T

Re: [R] substitute in a named expression

2005-06-22 Thread Gabor Grothendieck
On 6/22/05, Søren Højsgaard <[EMAIL PROTECTED]> wrote: > I have a 'named expression' like > expr <- expression(rep(1,d)) > and would like to replace the argument d with say 5 without actually > evaluating the expression. So I try substitute(expr, list(d=5)) in which > case R simply returns expr

Re: [R] classes with chron slots

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Martin Maechler <[EMAIL PROTECTED]> wrote: > > "Sebastian" == Sebastian Luque <[EMAIL PROTECTED]> > > on Wed, 22 Jun 2005 15:50:50 -0500 writes: > >Sebastian> I'd like to define a class with a chron slot, but: >R> require(chron) >R> setClass("myclass", represent

Re: [R] classes with chron slots

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Martin Maechler <[EMAIL PROTECTED]> wrote: > > "Sebastian" == Sebastian Luque <[EMAIL PROTECTED]> > > on Wed, 22 Jun 2005 15:50:50 -0500 writes: > >Sebastian> I'd like to define a class with a chron slot, but: >R> require(chron) >R> setClass("myclass", represent

Re: [R] classes with chron slots

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Sebastian Luque <[EMAIL PROTECTED]> wrote: > Thanks a lot Martin and Gabor! > > > On Thu, 23 Jun 2005 08:20:44 -0400, > Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > > [...] > > > Also if you are referring to the chron package then >

Re: [R] classes with chron slots

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 6/23/05, Sebastian Luque <[EMAIL PROTECTED]> wrote: > > Thanks a lot Martin and Gabor! > > > > > > On Thu, 23 Jun 2005 08:20:44 -0400, > > Gabor Grothendieck <[EMAIL PROTECTED]> wrote

Re: [R] how to get such crosstable?

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Marc Schwartz <[EMAIL PROTECTED]> wrote: > On Thu, 2005-06-23 at 23:22 +0800, ronggui wrote: > > i use the CrossTable (frome gregmic package) function to get such a > > table as below. > > but the percentage of the non-NA levels(here 1,2,3,4,5) is not totally > > 100%. > > > > is there

Re: [R] the dimname of a table

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Marc Schwartz <[EMAIL PROTECTED]> wrote: > On Thu, 2005-06-23 at 23:12 +0800, ronggui wrote: > > i have a data frame(dat) which has many variables.and i use the > > following script to get the crosstable. > > > > >danx2<-c("x1.1","x1.2","x1.3","x1.4","x1.5","x2","x4","x5","x6","x7","x8.

Re: [R] How to create ts..

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, Juan Carlos Quiroz Espinosa <[EMAIL PROTECTED]> wrote: > Hi user's > > How to create a date vector utilized only month and year data. I am > trying to plotting time series without day data. Check out ?ts and, in particular, look at the variable z in the example toward the end of the

Re: [R] A. Mani : Read

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, A. Mani <[EMAIL PROTECTED]> wrote: > Hello, > What is the best way to read a .rdat file with data in the following > form : > > $xyz1 > column names > columns(numeric) > > $xyz2 > column names > columns(numeric) > > $xyz3 > column names > columns(numeric) > RRead in the data

Re: [R] the quick way to report the invalid value

2005-06-23 Thread Gabor Grothendieck
On 6/23/05, ronggui <[EMAIL PROTECTED]> wrote: > for example,in my data d,the value 1:9,NA is valid and the others are invalid. > and i want to report something like: > the variable z has invalid value. > > is there any function to do so? > > i though this will work but fails: > > > d >x y

Re: [R] r programming help II

2005-06-23 Thread Gabor Grothendieck
On 6/24/05, Mohammad Ehsanul Karim <[EMAIL PROTECTED]> wrote: > Dear List, > > Suppose we have a variable K.JUN defined as (with > 1=wet, 0=dry): > > K.JUN1984 = c(1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, > 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) > K.JUN1985 = c(0, 1, 0, 1, 0, 0, 1, 0, 0

Re: [R] r programming help III

2005-06-24 Thread Gabor Grothendieck
Admittedly this is not much of an additional simplification but one other thing that can be done is that pN0 and pN1 can be written in terms of sapply, e.g. pN0<-c(p11^N, sapply(1:7, pDry)) On 6/24/05, Tuszynski, Jaroslaw W. <[EMAIL PROTECTED]> wrote: > I am not sure if you can make this code s

Re: [R] seq in R

2005-06-24 Thread Gabor Grothendieck
On 6/24/05, Omar Lakkis <[EMAIL PROTECTED]> wrote: > I want to generate a sequence from 1 to x by 1 > seq(1,x,by=1) > I want the above to return an empty list if x is zero seq(length = x) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mai

Re: [R] R demos

2005-06-24 Thread Gabor Grothendieck
On 6/24/05, Federico Calboli <[EMAIL PROTECTED]> wrote: > Hi All, > > I am currently preparing some form of slideshow introducing R and its > capabilities for some colleagues. The thing will be about 30 mins, and > I'd like to have some "pretty pictures" and some "amazing facts" (I'm > trying to s

Re: [R] help with PCA and classical scaling

2005-06-24 Thread Gabor Grothendieck
On 6/24/05, Domenico Cozzetto <[EMAIL PROTECTED]> wrote: > Dear all, > I have a matrix of dissimilarities and I'd like to get a 2d embedding. I'm > not an expert of these techniques, so I'm a bit confused... Furthermore I > was not able to find on the web any satisfactory tutorial. So even though >

Re: [R] comparing strength of association instead of strength of evidence?

2005-06-24 Thread Gabor Grothendieck
On 6/24/05, Kjetil Brinchmann Halvorsen <[EMAIL PROTECTED]> wrote: > Weiwei Shi wrote: > > >Hi, > >I asked this question before, which was hidden in a bunch of > >questions. I repharse it here and hope I can get some help this time: > > > >I have 2 contingency tables which have the same group vari

Re: [R] Gini with frequencies

2005-06-24 Thread Gabor Grothendieck
On 6/24/05, Dimitri Joe <[EMAIL PROTECTED]> wrote: > Hi there, > > I am trying to compute Gini coefficients for vectors containing income > classes. The data I possess look loke this: > > yit <- c(135, 164, 234, 369) > piit <- c(367, 884, 341, 74 ) > > where yit is the vector of income classes

Re: [R] visualizing frequencies

2005-06-26 Thread Gabor Grothendieck
On 6/26/05, Mag. Ferri Leberl <[EMAIL PROTECTED]> wrote: > Dear everybody, > > In our game-theory lesson we have run several classroom-experiments where the > students had to decide for a natural number between one and seven. I have > troubles now to visualize the results: be a the vector of answe

Re: [R] chisq.test using amalgamation automatically (possible ?!?)

2005-06-26 Thread Gabor Grothendieck
On 6/26/05, Mohammad Ehsanul Karim <[EMAIL PROTECTED]> wrote: > Dear List, > > > If any of observed and/or expected data has less than > 5 frequencies, then chisq.test (Pearson's Chi-squared > Test for Count Data from package:stats) gives warning > messages. For example, > > x<-c(10, 14, 10, 11

Re: [R] dates and time formats

2005-06-26 Thread Gabor Grothendieck
On 6/26/05, Mike R <[EMAIL PROTECTED]> wrote: > Is there a way in R to globally setup a default format for dates for all, or > nearly all, or just "many" R date/time-related functions? > > For example, dates in library(chron) expects, by default, MDY with > forward-slash delimiters, whereas my hab

Re: [R] Convert a "by" list into a data frame

2005-06-26 Thread Gabor Grothendieck
On 6/26/05, Tudor Bodea <[EMAIL PROTECTED]> wrote: > Dear useRs, > > Is there a way to convert a list generated by "by" command into a data frame? Here is an example which creates a by object whose elements are the first row of each Species of iris. The next line converts that to a data frame:

Re: [R] How to convert "c:\a\b" to "c:/a/b"?

2005-06-26 Thread Gabor Grothendieck
On 6/27/05, Dirk Eddelbuettel <[EMAIL PROTECTED]> wrote: > > On 26 June 2005 at 20:30, Spencer Graves wrote: > | How can one convert back slashes to forward slashes, e.g, changing > | "c:\a\b" to "c:/a/b"? I tried the following: > | > | > gsub("", "/", "c:\a\b") > | [1] "c:\a\b" > >

Re: [R] How to convert "c:\a\b" to "c:/a/b"?

2005-06-27 Thread Gabor Grothendieck
to be able to use this in R with its non-R meaning, e.g., in > readLine, count.fields, read.table, etc., after appending a file name. > Your three solutions all work for my oversimplified toy example but are > inadequate for the problem I really want to solve. > > Thanks, >

Re: [R] "all connections are in use" error during lazyload stage of packa ge installation

2005-06-29 Thread Gabor Grothendieck
On 6/29/05, Tuszynski, Jaroslaw W. <[EMAIL PROTECTED]> wrote: > Hi, > > I suddenly started getting strange errors while working on my caTools > package: > > >RCMD install C:/programs/R/rw2011/src/library/caTools > .. >preparing package caTools for lazy loading >Error

Re: [R] How to convert "c:\a\b" to "c:/a/b"?

2005-06-29 Thread Gabor Grothendieck
unable to get "scan('clipboard', what='', > allowEscapes=FALSE))" to work reliably on my system using Rgui under > Windows XP, R 2.1.1 patched. However, "file.choose()" works like a charm. > > Thanks again, everyone. > s

Re: [R] How to convert "c:\a\b" to "c:/a/b"

2005-06-29 Thread Gabor Grothendieck
Note that if you want to source it rather than than run it as a batch job from the command line you will something like this. The way it works is that one puts the file name into comments that are marked with tags and the script rereads itself as data picking out the tagged lines and removing the

Re: 答复: [R] fail in addin g library in new version.

2005-06-30 Thread Gabor Grothendieck
sole prompt to find out (this will work provided you let it install the key into the registry when you installed R initially). The reg command is a command built into Windows (I used XP but I assume its the same on other versions) that will query the Windows registry: reg query hklm\software\r-core\r

Re: [R] plot (log scale on y-axis)

2005-06-30 Thread Gabor Grothendieck
On 6/29/05, Jing Shen <[EMAIL PROTECTED]> wrote: > I am planning to plot my data on log scale (y-axis). There is a > parameter in plot function, which is > plot( ..., log="y", ...) > While, the problem is that it is with base of e. Is there a way to let > me change it to 10 instead of e? > Is you

Re: [R] parsing '...' function argument?

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Oleg Sklyar <[EMAIL PROTECTED]> wrote: > Dear community, > > I am writing a wrapper for '[' operator, which is a generic method > declared as function(x, i, j, ..., drop). It turns out that I need to > parse the '...' argument and this is where I am stuck. Generally what I > need is th

Re: 答复: [R] fail in addin g library in new version.

2005-06-30 Thread Gabor Grothendieck
. > Type 'q()' to quit R. > > Working directory is C:/Documents and Settings/xiaohuadai > bugs() function loaded from file c:\bugsR\bugs.R > display() and sim() functions loaded from file c:\bugsR\regression.R > > > --- > > Xi

Re: [R] ts.plot data labels

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Beth Wilmot <[EMAIL PROTECTED]> wrote: > Dear R users, > I am trying to put labels on the data points on a ts.plot. > > I have tried: > ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), xlab="group", > ylab="level")) > which plots fine but gives no labels > > xy.labels=TRUE > also

Re: [R] request/suggestion: modified names

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Ritter, Christian C GSMCIL-GSTMS/2 <[EMAIL PROTECTED]> wrote: > For some time now I use a modified version of names (extract direction) of > the following type: > Names<- > function (x,filter="^") > { >grep(filter,names(x),value=TRUE) > } > > Request: > Has anyone already writ

Re: [R] "10^k" axis labels {was ".. (log scale on y-axis)"}

2005-07-01 Thread Gabor Grothendieck
On 7/1/05, Martin Maechler <[EMAIL PROTECTED]> wrote: > >>>>> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> > >>>>> on Thu, 30 Jun 2005 07:28:30 -0400 writes: > >Gabor> On 6/29/05, Jing Shen <[EMAIL PROTECTED]

Re: [R] Lines for plot (Sweave)

2005-07-01 Thread Gabor Grothendieck
On 7/1/05, Doran, Harold <[EMAIL PROTECTED]> wrote: > Dear List: > > I am generating a series of plots iteratively using Sweave. In short, a > dataframe is subsetted row by row and variable graphics are created > conditional on the data in each row. In this particular case, this code > ends up gen

Re: [R] Lines for plot (Sweave)

2005-07-01 Thread Gabor Grothendieck
A variation on your idea might be: fo <- stu.vector ~ x lines(fo, model.frame(fo), lty=1, col='blue') On 7/1/05, Don MacQueen <[EMAIL PROTECTED]> wrote: > You can use: > > lines(x[!is.na[stu.vector], stu.vector[!is.na(stu.vector)], lty=1, > col='blue') > > -Don > > At 1:43 PM -0400 7/1/05,

Re: [R] interrupted Y axis

2005-07-02 Thread Gabor Grothendieck
On 7/2/05, Nick Drew <[EMAIL PROTECTED]> wrote: > I did not find an answer to my question after a quick > search using the R > search engine so thought I'd ask away: > > Does any know if there's a function exists to create > an interrupted Y axis? > What I mean by interrupted Y axis is that part o

Re: [R] plot question

2005-07-02 Thread Gabor Grothendieck
Trying characters and expressions variously it seems that font.lab applies to character strings but not to expressions so if you want to use an expression just use bold (or whatever) explicitly on the expression. One gotcha is that bold will not work as one might have expected on numbers so they m

Re: [R] demo(scoping)

2005-07-03 Thread Gabor Grothendieck
On 7/3/05, ronggui <[EMAIL PROTECTED]> wrote: > entercount an error with demo(scoping). > > > demo(scoping) > > >demo(scoping) > ~~~ > ___snip_ > > > > ross$balance() > Your balance is 120 > > > > try(ross$withdraw(500)) > Error in ross$withdraw(500) : You don't h

Re: [R] plot question

2005-07-03 Thread Gabor Grothendieck
xt. > > Your solution is the rigorous one! > > John > > for example -- > > plot(rnorm(10),rnorm(10),xlab=" ",ylab=" ") > title(xlab="year", > ylab=expression(paste("M x"*10^{3})),font.lab=1,col.lab=4, > cex.lab=1.25) > >

Re: [R] over/under flow

2005-07-03 Thread Gabor Grothendieck
On 7/3/05, William H. Asquith <[EMAIL PROTECTED]> wrote: > I am porting some FORTRAN to R in which an Inf triggers an if(). The > trigger is infinite on exp(lgamma(OVER)). What is the canonical R > style of determining OVER when exp(OVER)== Inf? The code structure > that I am > porting is best l

Re: [R] RESIDUALS IN THE AR TIME SERIES FUNCTION

2005-07-04 Thread Gabor Grothendieck
On 7/4/05, Talarico Massimiliano (Xelion) <[EMAIL PROTECTED]> wrote: > Dear all, > > It's possible to obtain the residuals with AR time series function. There is no residuals method for the "ar" class but you could try this using the lh dataset as an example. Note that the zoo package is require

Re: [R] Symbolic Maximum Likelihood in R

2005-07-04 Thread Gabor Grothendieck
On 7/3/05, Doran, Harold <[EMAIL PROTECTED]> wrote: > Dear List: > > Is any one aware of a package that would extend the D() function and allow > for one to maximize a likelihood function symbolically? Something akin to > Solve[x==0, parameter] function in Mathematica? > > Clearly R has the cap

Re: [R] A faster way to aggregate?

2005-07-04 Thread Gabor Grothendieck
On 7/4/05, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear List, > > I have a logical data frame with NA's and a grouping factor, and I want to > calculate > the % TRUE per column and group. With an indexed database, result are mainly > limited by printout time, but my R-solution below let's me wa

Re: [R] A faster way to aggregate?

2005-07-04 Thread Gabor Grothendieck
gt; > limited by printout time, but my R-solution below lets me wait. > > Any suggestions to speed this up? > > Gabor Grothendieck gmail.com> writes: > > > Look at ?rowsum > > Nearby colMeans works, but why so slow? > > Dieter Menne > > # Generate t

Re: [R] Derivative of a function

2005-07-05 Thread Gabor Grothendieck
On 7/4/05, Gabriel Rodrigues Alves Margarido <[EMAIL PROTECTED]> wrote: > Suppose I have a simple function that returns a matrix, such as: > > test <- function(x){ return(matrix(c(x,x^2,x^3,x^4),2,2)) } > > so that test returns: > [ x x^3 ] > [ x^2x^4 ] > > Is it possible for me to get

Re: [R] Derivative of a function

2005-07-05 Thread Gabor Grothendieck
On 7/5/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 7/4/05, Gabriel Rodrigues Alves Margarido > <[EMAIL PROTECTED]> wrote: > > Suppose I have a simple function that returns a matrix, such as: > > > > test <- function(x){ return(matrix(c(x,x^2,x^3,x^

Re: [R] bringToBottom? and tcltk document

2005-07-05 Thread Gabor Grothendieck
On 7/5/05, wu sz <[EMAIL PROTECTED]> wrote: > Are there any introductory and detailed "tcltk" documents or help > files or books for using this package in R ? Do a google search for tcltk examples and look at the first hit. That page in turn links to many tcltk examples and the last link is

[R] [R-pkgs] batchfiles for Windows

2005-07-06 Thread Gabor Grothendieck
ibrary if R_LIBS has not already been set. - makepkgs.bat 4. locating various R tools that are used in building R packages on your system by querying the registry. - Rfind.bat Comments welcome. Gabor Grothendieck ___ R-packages mailing list [EM

Re: [R] plotting on a reverse log scale

2005-07-06 Thread Gabor Grothendieck
Not sure if I am missing something essential here but it would seem as simple as: # data set.seed(1) x <- runif(500, 1500, 1990) # plot d <- density(x, from = 1500, to = 1990) plot(d$y ~ d$x, log = "x") rug(x) axis(1, seq(1500, 1990, 10), FALSE, tcl = -0.3) On 7/6/05, Michael Friendly <[EMAIL

Re: [R] Tables: Invitation to make a collective package

2005-07-07 Thread Gabor Grothendieck
If the functionality you are thinking of already exists across multiple packages an alternative to creating a new package would be to create a task view as in: http://cran.r-project.org/src/contrib/Views/ as explained in the ctv package and the article in R News 5/1. On 7/7/05, Jose Claudio Far

Re: 答复: 答复: [R] fail in add ing library in new version.

2005-07-07 Thread Gabor Grothendieck
> > batch file > > *** installation of example failed *** > > Well, make.exe is not find in your path. Please check whether the file > exists and the path has been added. > > Uwe Ligges > > > > Removing 'D:/PROGRA~1/R/rw2011/library/example' > &

Re: 答复: 答复: [R] fail in add ing library in new version.

2005-07-07 Thread Gabor Grothendieck
On 7/7/05, Uwe Ligges <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > > On 7/7/05, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > > >>Ivy_Li wrote: > >> > >> > >>>Dear all, > >>> I have done every step as

Re: [R] plotting on a reverse log scale

2005-07-07 Thread Gabor Grothendieck
# Now do the minor ticks, at 1/10 of each power of 10 interval > axis(1, at = 1:10 * rep(axis.at[-1] / 10, each = 10), > tcl = -0.5, labels = FALSE) > > # Do the rug plot > rug(x) > > > Not sure if this is helpful here, but thought I would post it for > review/critique. The &#

Re: [R] How do you sort a data frame on a selection of columns?

2005-07-07 Thread Gabor Grothendieck
On 7/7/05, Briggs, Meredith M <[EMAIL PROTECTED]> wrote: > This is what to start with: > > Data Frame A BC D >c1 4 y 5 >c3 6 d 7 >c1 5 t 6 > > Now sort on A then C > > This

Re: [R] fail in adding library in new version.

2005-07-07 Thread Gabor Grothendieck
ke: *** [pkg-example] Error 2 >*** Installation of example failed *** >Removing 'D:/PROGRA~1/R/rw2011/library/example' > > Please tell me which step is wrong? > Thanks a lot! > > BG > Ivy_Li > > > -原始邮件- > 发件人: Gabor Grothend

Re: [R] fail in adding library in new version.

2005-07-07 Thread Gabor Grothendieck
There is also an even larger source of examples at: http://cran.r-project.org/src/contrib/Descriptions/ although the built caveat mentioned below applies here as well. On 7/7/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > You cannot use an empty DESCRIPTION file. > To get more

Re: [R] Plotting a simple subset

2005-07-08 Thread Gabor Grothendieck
To be fair none of Introduction to R, ?plot nor the reference card really cover this without substantial digging. # test data x <- 1:10 y <- x*x plot(x[x > 5], y[x > 5]) # or plot(y ~ x, subset = x > 5) # We can have combine conditions like this: plot(y ~ x, subset = x > 5 & y < 50) # al

Re: [R] time series regression

2005-07-08 Thread Gabor Grothendieck
On 7/8/05, yyan liu <[EMAIL PROTECTED]> wrote: > Hi: > I have two time series y(t) and x(t). I want to > regress Y on X. Because Y is a time series and may > have autocorrelation such as AR(p), so it is not > efficient to use OLS directly. The model I am trying > to fit is like > Y(t)=beta0+beta1*

Re: [R] "more" and "tab" functionalities in R under linux

2005-07-08 Thread Gabor Grothendieck
Here are some possibilities: - head(iris) will show the first few rows of the data frame - edit(iris) will put up a spreadsheet with the data frame in it that you can scroll - In JGR (a GUI front end for R) you can use the object browser (ctrl-B) - If the object is a file rather than a data frame u

Re: [R] Multiple assignments in one statement

2005-07-08 Thread Gabor Grothendieck
Check out: http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html http://tolstoy.newcastle.edu.au/R/help/04/06/1406.html On 7/8/05, Jeffrey Horner <[EMAIL PROTECTED]> wrote: > Is this possible? > > For instance, I have a function that returns a vector length 3. In one > statement I'd like to assi

Re: [R] merge

2005-07-08 Thread Gabor Grothendieck
trim in package gdata will trim spaces off the beginning and end. On 7/8/05, Ling Jin <[EMAIL PROTECTED]> wrote: > Hi all, > > I have two data frames to merge by a column containing the site names > (as characters). However, somehow, one of the site names of one data > frame have fixed length, s

Re: [R] Overlying a Normal Dist in a Barplot

2005-07-08 Thread Gabor Grothendieck
On 7/8/05, Bret Collier <[EMAIL PROTECTED]> wrote: > R-Users, > Hopefully someone can shed some light on these questions as I had > little luck searching the archives (although I probably missed something > in my search due to the search phrase). I estimated multinomial > probabilities for some co

Re: [R] Overlying a Normal Dist in a Barplot

2005-07-08 Thread Gabor Grothendieck
= x, boxwex = 1, medlty = 0, add = TRUE, col = "lightgrey") curve(dnorm(x, 2.84, 1.57), min(xrange), max(xrange), add = TRUE) On 7/8/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 7/8/05, Bret Collier <[EMAIL PROTECTED]> wrote: > > R-Users, > > Ho

Re: [R] Finite Mixture Models with logistic regression

2005-07-09 Thread Gabor Grothendieck
On 7/9/05, Spencer Graves <[EMAIL PROTECTED]> wrote: > Lindsey's > packages are not available for all platforms and so are not available on > CRAN. Is it true that all CRAN packages in the main repository are available on all platforms? (There is at least an other-software area: http://cra

Re: [R] Help to make a specific matrix

2005-07-09 Thread Gabor Grothendieck
On 7/9/05, Jose Claudio Faria <[EMAIL PROTECTED]> wrote: > Dear R users, > > The solution is probably simple but I need someone to point me to it. > How can I to generate a matrix from a numeric sequence of 1:10 like 'A' or 'B' > below: > > A) > || > | 1 2 3 4 5 | > |

Re: [R] Using a string as a filter

2005-07-10 Thread Gabor Grothendieck
On 7/10/05, Yzhar Toren <[EMAIL PROTECTED]> wrote: > Hi , > > I want to be able to filter out results using a string. I'm running an > automated script that reads a list of filters I get from an external > source and applys them to my data frame consecutively. > > For example I want to get : data

Re: [R] Help with Mahalanobis

2005-07-10 Thread Gabor Grothendieck
I think you could simplify this by replacing everything after the nObjects = nrow(mds) line with just these two statements. f <- function(a,b) mapply(function(a,b) (mds[a,] - mds[b,])%*%InvS%*%(mds[a,] - mds[b,]), a,b) D2 <- outer(seq(nObjects), seq(nObjects), f) This also eliminates dep

Re: [R] Help with Mahalanobis

2005-07-10 Thread Gabor Grothendieck
), seq(nObjects), f) } # # test # D2M3 = D2Mah3(iris[,1:4], iris[,5]) On 7/10/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > I think you could simplify this by replacing everything after the > nObjects = nrow(mds) line with just these two statements. > > f <- functi

Re: [R] Help with Mahalanobis

2005-07-10 Thread Gabor Grothendieck
(mds[a,] - mds[b,])%*%InvS%*%(mds[a,] - mds[b,]), a, b) > D2 = outer(seq(nObjects), seq(nObjects), f) > } > > # > # test > # > D2M2 = D2Mah2(iris[,1:4], iris[,5]) > print(D2M2) > > Gabor Grothendieck wrote: > > I think you could simplify this by replacing everyth

Re: [R] building packages on Windows

2005-07-11 Thread Gabor Grothendieck
On 7/11/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 7/11/2005 3:21 PM, Sundar Dorai-Raj wrote: > > Hi, all, > > > > I just recently upgraded my computer though I'm using the same OS (XP). > > But now I'm having difficulty building packages and I cannot seem to > > solve the problem. I'm usin

Re: [R] How to obtain Frequency Tables for Histogram outputs and Frequency Polygons

2005-07-11 Thread Gabor Grothendieck
On 7/12/05, Tan Hui Hui Jenny <[EMAIL PROTECTED]> wrote: > Couple of questions: > > 1. How can I obtain the frequency tables for a histogram chart? > 2. Is there a short cut to obtain the frequency polygons directly without > having to generate the frequency table and doing a line plot? res <- h

Re: [R] elegant matrix creation

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Robin Hankin <[EMAIL PROTECTED]> wrote: > Hi > > I want to write a little function that takes a vector of arbitrary > length "n" and returns a matrix of size n+1 by n+1. > > I can't easily describe it, but the following function that works for > n=3 should convey what I'm trying to do

Re: [R] Installing RSPerl and Statistics::R

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Luc Vereecken <[EMAIL PROTECTED]> wrote: > Hi list, > > For my research, I started using R as a statistics engine, driven by > perl scripts that manage my data and computational jobs. I recently > upgraded my cluster to Suse 9.2, and obviously wanted to upgrade R to > it's latest versi

Re: [R] using its to import time series data with uneven dates

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Sheri Conner Gausepohl <[EMAIL PROTECTED]> wrote: > Good day: > > I am trying to use > readcsvIts("nwr_data_qc.txt",informat=its.format("%Y%m%d%h%M > %Y"),header=TRUE,sep="",skip=0,row.names=NULL,as.is=TRUE,dec=".") > > to read in a file (nwr_data_qc.txt) that looks like this: > > T

Re: [R] using its to import time series data with uneven dates

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 7/12/05, Sheri Conner Gausepohl <[EMAIL PROTECTED]> wrote: > > Good day: > > > > I am trying to use > > readcsvIts("nwr_data_qc.txt",informat=its.format("%Y%m%d%h%M > >

Re: 答复: [R] fail in addin g library in new version.

2005-07-12 Thread Gabor Grothendieck
t; > Well, there are still aother error: > > > > -- Making package example > > adding build stamp to DESCRIPTION > > error happened.read_description(dfile) : file > > 'D:/example/DESCRIPTION' is not in valid DCF f

Re: [R] How to use the function "plot" as Matlab?

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, klebyn <[EMAIL PROTECTED]> wrote: > Hello, > > How to use the function plot to produce graphs as Matlab? > example in Matlab: > > a = [1,2,5,3,6,8,1,7]; > b = [1,7,2,9,2,3,4,5]; > plot(a,'b') > hold > plot(b,'r') > > > How to make the same in R-package ? > > I am trying something t

Re: 答复: 答复: [R] fail in add ing library in new version.

2005-07-12 Thread Gabor Grothendieck
mple] Error 1 >make: *** [pkg-example] Error 2 >*** Installation of example failed *** > >Removing 'D:/PROGRA~1/R/rw2011/library/example' >Restoring previous 'D:/PROGRA~1/R/rw2011/library/example' > > I don't know why it ca

Re: [R] Is there a working XML parser for the windows R Version 2.0.1

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Soren Wilkening <[EMAIL PROTECTED]> wrote: > Dear all > > the regular XML package does not work correctly with the R 2.0.1 windows > version. > Can anybody indicate a suitable alternative ? > I need to dynamically read, parse and process a HTML table in R that is > available at a certa

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Young Cho <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a column of a dataframe which has time stamps > like: > > > eh$t[1] > [1] 06/05/2005 01:15:25 > > and was wondering how to convert it to chron variable. > Thanks a lot. Try this: # test data frame eh containing a factor v

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
You could use the nlines= argument to scan to read in a portion at a time. On 7/13/05, Weiwei Shi <[EMAIL PROTECTED]> wrote: > > add: > I used > trn<-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529, > ncol=195) > > it is done. > so it seems that I just have no patience to wait

Re: [R] High resolution plots

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Luis Tercero <[EMAIL PROTECTED]> wrote: > > Dear R-help community, > > would any of you have a (preferably simple) example of a > presentation-quality .png plot, i.e. one that looks like the .eps plots > generated by R? I am working with R 2.0.1 in WindowsXP and am having > similar p

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
[I had some email problems and am sending this again. Sorry if you get it twice.] You could use the nlines= argument to scan to read in a portion at a time. > > > On 7/13/05, Weiwei Shi <[EMAIL PROTECTED]> wrote: > > add: > > I used > > trn<-matrix(scan('train1.dat', sep='|', na.string=

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
[I had some emails problems so I am sending this again. Sorry if you get it twice.] On 7/13/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > > > On 7/13/05, Young Cho <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have a column of a dataframe which ha

Re: [R] High resolution plots

2005-07-13 Thread Gabor Grothendieck
[I had some email problems so I am sending this again. Sorry if you get this twice.] On 7/13/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > > > On 7/13/05, Luis Tercero > <[EMAIL PROTECTED]> wrote: > > Dear R-help community, > > > > would any of

<    3   4   5   6   7   8   9   10   11   12   >