Re: [R] box() and hist()

2004-10-26 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: Hi, does anybody know why the following is not working: hist(rnorm(200)) box(bty="o") gives me a box without rounded corners. Because that isn't what it is supposed to do. Did you expect "7" to give you a slanting right edge? And which letter sho

Re: [R] Error in lazyLoadDBfetch

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Martin Keller-Ressel wrote: > Hello, > > what does the following error mean?? > It occured during or at the end of a lengthy (and memory-intensive) > calculation using a routine from a shared library called via the '.C' > function: > > Error in lazyLoadDBfetch(key, datafil

Re: [R] Idiom for column operations?

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Rob Steele wrote: > Is there a better way to express operations between matrices and column > vectors than transposing the matrix twice? > > This is the kind of thing I'm talking about: > > m = matrix(1:20, 3, 4) Ouch: that gives a warning as 20 > 3*4. > v = colSums(m) >

RE: [R] Secondary y axis

2004-10-26 Thread Austin, Matt
You could replace your last two lines with the following. You'll need to play with the axes labeling to make it pretty. scaled.c <- scale(c) par(new=TRUE) plot(scaled.c, ylim=c(-5, 5), xaxt="n", yaxt="n", col='green', type='l', xlab="", ylab="") axis (4, labels=round(seq(-2, 2, .25)*attr(s

Re: [R] Combining columns of different length

2004-10-26 Thread Gabor Grothendieck
Federico Gherardini pigrecodata.net> writes: : : Thanks everybody for their help but in this particular case I've found a : very easy solution. Since the matrix is preallocated I don't really have : to add a new column: given a matrix of NAs I can simply : : m[,index][1:length(vec)] <- vec :

[R] Secondary y axis

2004-10-26 Thread John Robot
Hi I had a look at the help and previous discussions but I am still unable to solve these issues: 1 I have a set of air pressure data. I would like to plot a and b (both about 980-1000 millibar) and c, the difference (around 0-8 millibar). I use axis (4) to create a new axis (to the right) but I do

Re: [R] Combining columns of different length

2004-10-26 Thread Federico Gherardini
Thanks everybody for their help but in this particular case I've found a very easy solution. Since the matrix is preallocated I don't really have to add a new column: given a matrix of NAs I can simply m[,index][1:length(vec)] <- vec Thanks again for your suggestions, they will be useful when I

[R] Error in lazyLoadDBfetch

2004-10-26 Thread Martin Keller-Ressel
Hello, what does the following error mean?? It occured during or at the end of a lengthy (and memory-intensive) calculation using a routine from a shared library called via the '.C' function: Error in lazyLoadDBfetch(key, datafile, compressed, envhook) : recursive default argument refere

Re: [R] Idiom for column operations?

2004-10-26 Thread Sundar Dorai-Raj
Rob Steele wrote: Is there a better way to express operations between matrices and column vectors than transposing the matrix twice? This is the kind of thing I'm talking about: m = matrix(1:20, 3, 4) v = colSums(m) t(t(m) / v) ## <-- kinda ugly, ain't it? I thought of converting the column v

[R] Idiom for column operations?

2004-10-26 Thread Rob Steele
Is there a better way to express operations between matrices and column vectors than transposing the matrix twice? This is the kind of thing I'm talking about: m = matrix(1:20, 3, 4) v = colSums(m) t(t(m) / v) ## <-- kinda ugly, ain't it? I thought of converting the column vector to a matrix:

RE: [R] Empirical P Value

2004-10-26 Thread Ted Harding
On 26-Oct-04 Phineas Campbell wrote: > I am trying to return the p value for a stat from the ECDF. > That is the index of the first occurrence, on an ordered vector, > of a value either greater than or equal to a given value. > > Ideally I would not have to order the vector beforehand. > > Curren

[R] Newbie question about the use of lm and anova

2004-10-26 Thread Sandie Peters
Version of R: Windows Version 2.0.0 The experimental design contains two plant lines - a control (C) and a mutant (M) - grown out three separate times in plots A, B, C. The design is unbalanced: In plot A, 9 control plants were grown with 29 mutant plants. In plot B, 8 control plants were

RE: [R] Need help finding max from 3d locfit output

2004-10-26 Thread Liaw, Andy
You can just do something like base[which.max(predict(fit)),]. One suggestion: Use something like locfit(log(Value) ~ lBrkOut + lExit, data=base, ...). It's much safer that way. HTH, Andy > From: lawrence Perepolkin > > Hi I am running the following locfit function: > > fit <- locfit( log(bas

Re: [R] Intro to R: lecture presentation

2004-10-26 Thread Patrick Connolly
On Mon, 25-Oct-2004 at 03:52PM +, Gabor Grothendieck wrote: [...] |> The first link worked for me using Windows XP and Internet Explorer |> 6. Using Mozilla on the same machine it seemed to download |> something but Mozilla was unable to render it (got same as you) so |> its likely using IE-

[R] Need help finding max from 3d locfit output

2004-10-26 Thread lawrence Perepolkin
Hi I am running the following locfit function: > fit <- locfit( log(base$Value) ~ base$lBrkOut + base$lExit , alpha=0.9) > plot(fit,type="persp" ) The above two steps create a nice 3d plot. I would like to find the xy coordinates where the maximum z occurs. Does any one know of function to cal

Re: [R] Empirical P Value

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Phineas Campbell wrote: > I am trying to return the p value for a stat from the ECDF. That is the > index of the first occurrence, > on an ordered vector, of a value either greater than or equal to a given > value. That's called a *quantile*, probably type=1 in the Hyndman-F

RE: Re: [R] read.spss Error reading system-file header

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Baize, Harold wrote: > > Bj?rn Stollenwerk <[EMAIL PROTECTED]> wrote: > > > I had and still have got the same problem. There were two columns in the > > data frame which contain just missing values. When I deleted those the > > impord seemed to work, but there is still a w

Re: [R] indexing within the function "aggregate"

2004-10-26 Thread Gabor Grothendieck
8rino-Luca Pantani unifi.it> writes: : : Hi all, : I'm trying to work out the following problem, but I can't imagine how. : : I have the following (much reduced & oversimplified) dataset : : My.df <- : cbind.data.frame(PPM=c(15.78, 15.81, 15.87, 15.83, 15.81, 15.84, :15.91,

RE: Re: [R] read.spss Error reading system-file header

2004-10-26 Thread Baize, Harold
Bj?rn Stollenwerk <[EMAIL PROTECTED]> wrote: > I had and still have got the same problem. There were two columns in the > data frame which contain just missing values. When I deleted those the > impord seemed to work, but there is still a warning message. > Warning message: > C:\test.sav: Unre

Re: [R] 2nd Y-axis text problem

2004-10-26 Thread Uwe Ligges
Sion Roberts wrote: Dear All, I'm having problems getting text to appear on a second y axisbecause this can only be done within a plot statement and my attempts to add the label as text didn't work because the "locator" refers to the plot area For axis, see ?axis. For margin text, see ?mte

[R] Splitting and saving separate dataframes

2004-10-26 Thread Doran, Harold
Dear List: I have a large dataframe that I need to break down into many smaller dataframes. Specifically, I have student achievement test scores for all students across grades 3 through 12. My goal is to create an individual dataframe for each grade. Rather than subsetting multiple times, the spli

[R] Empirical P Value

2004-10-26 Thread Phineas Campbell
I am trying to return the p value for a stat from the ECDF. That is the index of the first occurrence, on an ordered vector, of a value either greater than or equal to a given value. Ideally I would not have to order the vector beforehand. Currently I use: PValue<-function(stat, ECDF){

Re: [R] integration problem

2004-10-26 Thread Sundar Dorai-Raj
Christoph Scherber wrote: Dear R users, I have spectral data (say, wavelength vs. extinction coefficient) for which I´d like to calculate an integral (i.e. the area underneath the curve). Suppose the (artificial) dataset is lambda E 1 2 2 4 3 5 4 8 5 1 6 5 7 4 8

[R] 2nd Y-axis text problem

2004-10-26 Thread Sion Roberts
Dear All, I'm having problems getting text to appear on a second y axisbecause this can only be done within a plot statement and my attempts to add the label as text didn't work because the "locator" refers to the plot area Any thoughts greatly appreciated. Thanks in advance, Sion >par(m

[R] indexing within the function "aggregate"

2004-10-26 Thread 8rino-Luca Pantani
Hi all, I'm trying to work out the following problem, but I can't imagine how. I have the following (much reduced & oversimplified) dataset My.df <- cbind.data.frame(PPM=c(15.78, 15.81, 15.87, 15.83, 15.81, 15.84, 15.91, 15.90, 15.83, 15.81, 15.93, 15.83, 15.

[R] integration problem

2004-10-26 Thread Christoph Scherber
Dear R users, I have spectral data (say, wavelength vs. extinction coefficient) for which I´d like to calculate an integral (i.e. the area underneath the curve). Suppose the (artificial) dataset is lambda E 1 2 2 4 3 5 4 8 5 1 6 5 7 4 8 9 9

Re: [R] vcov method for 'coxph' objects

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Vito Muggeo wrote: > Dear all, > The help file for the generic function vcov states > > "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme', > 'gls', 'coxph' and 'survreg' (the last two in package 'survival')." > > Since, I am not able to use vcov.coxp

Re: [R] vcov method for 'coxph' objects

2004-10-26 Thread Peter Dalgaard
"Vito Muggeo" <[EMAIL PROTECTED]> writes: > Dear all, > The help file for the generic function vcov states > > "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme', > 'gls', 'coxph' and 'survreg' (the last two in package 'survival')." > > Since, I am not able to use vcov.co

Re: [R] GLM model vs. GAM model

2004-10-26 Thread Prof Brian Ripley
R does not contain a gam() function. *Two* contributed packages, gam and mgcv, do. Please do as the posting guide asks and clarify what you are talking about here. Your penultimate para is not logical: the tests are _not_ based on maximum likelihood if ML fitting is not used. However, there ar

[R] R for Palm OS

2004-10-26 Thread Alberto Murta
Dear all Has anyone tried to compile R for the Palm OS? -- Alberto G. Murta Institute for Agriculture and Fisheries Research (INIAP-IPIMAR) Av. Brasilia, 1449-006 Lisboa, Portugal | Phone: +351 213027120 Fax:+351 213015948 | http://ipimar-iniap.ipimar.pt

[R] vcov method for 'coxph' objects

2004-10-26 Thread Vito Muggeo
Dear all, The help file for the generic function vcov states "Classes with methods for this function include: 'lm', 'glm', 'nls', 'lme', 'gls', 'coxph' and 'survreg' (the last two in package 'survival')." Since, I am not able to use vcov.coxph(), I am wondering whether I am missing something (as

Re: [R] GLM model vs. GAM model

2004-10-26 Thread Thomas Lumley
On Tue, 26 Oct 2004, SUBIRANA CACHINERO, ISAAC wrote: I have a question about how to compare a GLM with a GAM model using anova function. You don't say what gam() function you are using. There are at least two out there and they work in quite different ways. A GLM is performed for example: model1

[R] Fitting additional variables to model

2004-10-26 Thread Min-Han Tan
Good morning, Sorry to trouble the list. I'm working on Cox models of survival, and am encountering a problem. I'm trying to group variables into some kind of new staging system By grouping, I mean : so-called 'integrated staging systems' for cancer merge categories of variables such as tumor sta

[R] GLM model vs. GAM model

2004-10-26 Thread SUBIRANA CACHINERO, ISAAC
I have a question about how to compare a GLM with a GAM model using anova function. A GLM is performed for example: model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial", na.action = na.exclude) A second nested model could be: model2 <-glm(formula = exitus ~ age+gender, fami

RE: [R] How to calculate Adjusted SS

2004-10-26 Thread Liaw, Andy
Seems like noone has responded (at least publicly), so I'll give it a stab. I'm not exactly sure what you mean by `adjusted SS'. (I believe it was Bill Venables who said something like `There's only one type of SS.') Prof. Fox's `car' package has the Anova() (note the capital `A') function that

Re: [R] Combining columns of different length

2004-10-26 Thread Petr Pikal
On 26 Oct 2004 at 15:46, Federico Gherardini wrote: > Hi all, > > Simple and direct question > Is it possible to add a shorter column to a data frame or matrix in > such a way that the missing values are replaced with NAs? For example > suppose I have > > 3 2 > 4 2 > 5 8 > > and I w

Re: [R] Combining columns of different length

2004-10-26 Thread Rolf Turner
In R all things are possible: rcb <- function (...) { # rcb <--> ``ragged cbind'' xxx <- list(...) n <- max(unlist(lapply(xxx,function(x){ifelse(is.matrix(x),nrow(x), length(x))}))) yyy <- lapply(xxx,function(x,n){if(is.matrix(x))

Re:[R] Combining columns of different length

2004-10-26 Thread Vito Ricci
Hi, you can use this simple function: add.col<-function(df, new.col) {n.row<-dim(df)[1] length(new.col)<-n.row cbind(df, new.col) } see this example: > x<-cbind(c(1,2,3),c(4,5,6)) > x [,1] [,2] [1,]14 [2,]25 [3,]36 >

Re: [R] Combining columns of different length

2004-10-26 Thread Yves Magliulo
hi, something like : toto is your data.frame toto= V1 V2 3 2 4 2 5 8 and tata= 3 3 so to do what you want make cbind(toto,c(tata,rep(NA,len=(length(toto$V1)-length(tata) maybe there is a easier way but it's work! -- -- Yves Magliulo <[EMAIL PROTECTED]> R&D Engineer, CLIMPACT

[R] Combining columns of different length

2004-10-26 Thread Federico Gherardini
Hi all, Simple and direct question Is it possible to add a shorter column to a data frame or matrix in such a way that the missing values are replaced with NAs? For example suppose I have 3 2 4 2 5 8 and I want to add a column 3 3 to get... 3 2 3 4 2 3 5 8 NA Thanks Federico

Re: [R] Importing big plain files from ERP-System/Data Mining with R

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004 [EMAIL PROTECTED] wrote: > > On Tue, 26 Oct 2004 [EMAIL PROTECTED] wrote: > > >> how can I import really big plain text data files (several GB) from an > > >Unlikely unless you have a 64-bit platform. > > Why? I have a 32-bit Win XP Platform running R 2.0.0. With ACL 8.21 e

Re: [R] box() and hist()

2004-10-26 Thread garbade
> [EMAIL PROTECTED] writes: > >> Hi, >> does anybody know why the following is not working: >> >> > hist(rnorm(200)) >> > box(bty="o") >> >> gives me a box without rounded corners. > > Because that isn't what it is supposed to do. Did you expect "7" to > give you a slanting right edge? And which le

Re: [R] putting legend outside ploting region

2004-10-26 Thread Aleš Žiberna
Thank you for your answer! I'm sorry that bother you with a question I could have found the answer to in the help pages, but I have missed it. Ales - Original Message - From: "Uwe Ligges" <[EMAIL PROTECTED]> To: "Aleš Žiberna" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday,

RE: [R] building a package under windows

2004-10-26 Thread Liaw, Andy
I suspect you won't have the problem if you build in a directory (aka folder) whose path does not contain spaces... (That is mentioned in README.package, I believe.) Andy > From: Gilles GUILLOT > > After checking paths, it works better. > But I still have trouble, see line -5 below : > > C:\

Re: [R] building a package under windows

2004-10-26 Thread Peter Dalgaard
Gilles GUILLOT <[EMAIL PROTECTED]> writes: > After checking paths, it works better. > But I still have trouble, see line -5 below : > > C:\Documents and Settings\guillot\Mes documents\package>R CMD build geneland > * checking for file 'geneland/DESCRIPTION' ... OK > * preparing 'geneland': > *

[R] persp(), scatterplot3d(), "..." argument

2004-10-26 Thread Robin Hankin
Hello list. I very often need 3d scatterplots, and use scatterplot3D quite a lot. I am trying to modify persp() to plot scatterplots, and make use of the theta and phi arguments that persp() offers. I am having some difficulty passing the correct arguments to persp(). Here is my function so far.

Re: [R] History command

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Neil Leonard wrote: > I was wondering whether there is a command in R similar to the '!' > command in unix. What do you think the `! command in Unix' does? Your subject line suggests you are thinking of the history substitution mechanism in a csh _shell_ (copied for bash).

Re: [R] Importing big plain files from ERP-System/Data Mining with R

2004-10-26 Thread r-help . 20 . stefan817
On Tue, 26 Oct 2004 [EMAIL PROTECTED] wrote: >> how can I import really big plain text data files (several GB) from an >Unlikely unless you have a 64-bit platform. Why? I have a 32-bit Win XP Platform running R 2.0.0. With ACL 8.21 e.g. 10 GB were no problem. >Only starting with R 2.0.0 can s

Re: [R] building a package under windows

2004-10-26 Thread Gilles GUILLOT
After checking paths, it works better. But I still have trouble, see line -5 below : C:\Documents and Settings\guillot\Mes documents\package>R CMD build geneland * checking for file 'geneland/DESCRIPTION' ... OK * preparing 'geneland': * cleaning src * removing junk files * building 'geneland_1

Re: [R] putting legend outside ploting region

2004-10-26 Thread Uwe Ligges
Aleš Žiberna wrote: Hello! I have created a plot and would like to put a legend in the top left corner (above and left of plotting region), but non of the functions can plot there (I tried 'legend', 'text', 'points', 'lines', 'mtext', 'axes',...). I would be very grateful if someone could help me p

[R] putting legend outside ploting region

2004-10-26 Thread Aleš Žiberna
Hello! I have created a plot and would like to put a legend in the top left corner (above and left of plotting region), but non of the functions can plot there (I tried 'legend', 'text', 'points', 'lines', 'mtext', 'axes',...). I would be very grateful if someone could help me put something in th

Re: [R] Ref: Variable scope or function behaviour or array reassign

2004-10-26 Thread Kunal Shetty
Thank you regards Kunal Uwe Ligges <[EMAIL PROTECTED]> wrote: > Kunal Shetty wrote: > > Uwe Ligges > > > >thank you for u prompt reply > > > > my problem was in step3 > > > > where my function returns two different arrays. > > > > Yes i did try retu

[R] History command

2004-10-26 Thread Neil Leonard
I was wondering whether there is a command in R similar to the '!' command in unix. Thanks Neil __ [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] help!!!

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004, Jim Gustafsson wrote: > I will compare some results in a dotplot. > > The picture is very dark(grey) in the background, could I get it ligther? library(lattice) # is needed ?trellis.device # and see themes. However, if you get a very dark grey, your computer system is set

[R] How to calculate Adjusted SS

2004-10-26 Thread WeiQiang . Li
Hi ALL, I am trying to compute adjusted SS & estimated component variance in GLM with un-balanced data using R. Can anyone advise me? Thanks in advance. Best Regards, WeiQiang Li [[alternative HTML version deleted]] __ [EMAIL PROTEC

Re: [R] read.spss Error reading system-file header

2004-10-26 Thread Björn Stollenwerk
Hi Jake, I had and still have got the same problem. There were two columns in the data frame which contain just missing values. When I deleted those the impord seemed to work, but there is still a warning message. Warning message: C:\test.sav: Unrecognized record type 7, subtype 13 encountered i

[R] Re: Importing big plain files from ERP-System/Data Mining with R

2004-10-26 Thread Vito Ricci
Hi, as concern R & datamining & large databases you can see those resources: Diego Kuonen, Introduction au data mining avec R : vers la reconquête du `knowledge discovery in databases' par les statisticiens. Bulletin of the Swiss Statistical Society, 40:3-7, 2001. http://www.statoo.com/en/publicat

RE: [R] sample variogram construction

2004-10-26 Thread Dan Bebber
Matt, In this case you are plotting the variogram of the residuals of the lme object, not of the data themselves. In your model you are assuming a linear relationship between count and time, with different intercepts and slopes for your different individuals. You are also assuming that the residua

[R] help!!!

2004-10-26 Thread Jim Gustafsson
Dear R users, Would need some help. I will compare some results in a dotplot. The picture is very dark(grey) in the background, could I get it ligther? R-code dotplot(LINES~VAL, groups=QQ,key=simpleKey(levels(QQ1),space="top"),xlab="Values",main="Tail-Measure" ) (where LINES,VAL, QQ is vect

Re: [R] Revision: post on Intro to R lecture

2004-10-26 Thread Thomas Schönhoff
Hi, Arin Basu schrieb: This follows my earlier post on webized slides on lecture presentation on introducing R. I learned that in Mozilla (Firefox) browsers, the slides did not show up. Sorry for the no show. As a reluctant windows user, I kind of carelessly clicked through Powerpoint to convert

Re: [R] Importing big plain files from ERP-System/Data Mining with R

2004-10-26 Thread Prof Brian Ripley
On Tue, 26 Oct 2004 [EMAIL PROTECTED] wrote: > how can I import really big plain text data files (several GB) from an Unlikely unless you have a 64-bit platform. Only starting with R 2.0.0 can some 32-bit versions of R access files > 2Gb, and to import the file into R you need enough address spa

[R] Importing big plain files from ERP-System/Data Mining with R

2004-10-26 Thread r-help . 20 . stefan817
Hi, how can I import really big plain text data files (several GB) from an ERP-System (SAP-Tables) to R? The Header of these files are always similar, for example: Tabelle:T009 Angezeigte Felder: 7 von 7 Feststehende Führungsspalten: 2 Listbreite 0250 -