[R] Generating data with a certain correlation length

2005-10-18 Thread Roy Werkman
Hi, Can anyone help me with following? I want to write a program which does following: for a 2dim surface generate random data, for certain points on that surface, for which a certain correlation length exists. Thanx, Roy -- The information contained in this communication and any atta...{{d

Re: [R] Lists and Binary Operators.

2005-10-18 Thread Prof Brian Ripley
On Wed, 19 Oct 2005, Narcyz Ghinea wrote: > > Dear R Users, > > Any insights into why the following occurs would be helpful > > Firstly: > > #Evaluating proportions > p<-as.list(rep(0,times=length(n))) #creating object of appropriate size. > for(j in 1:length(n)){ > for(k in 1:length(n[[j]])){

[R] Lists and Binary Operators.

2005-10-18 Thread Narcyz Ghinea
Dear R Users, Any insights into why the following occurs would be helpful Firstly: #Evaluating proportions p<-as.list(rep(0,times=length(n))) #creating object of appropriate size. for(j in 1:length(n)){ for(k in 1:length(n[[j]])){ p[[j]][[k]]<- (s[[j]][[k]]/n[[j]][k])}} # 31 x k x num_sampl

Re: [R] ipop (kernlab) gives pars < lower bound ?

2005-10-18 Thread Alexis Diamond
hi again, i have fixed some of the problems i emailed about previously-- the answer is to fiddle with the "margin" variable. but new problems have arisen: when i set the "margin" variable appropriately to preclude negative values, i get the following error message: Error in drop(.Call("La_dgesv"

Re: [R] Installing Bioconductor on R

2005-10-18 Thread arun r
On 18 Oct 2005 19:55:22 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Arunkumar R <[EMAIL PROTECTED]> writes: > > > hi all, > >Am new to R. I am having problems installing Bioconductor > > package in > > R on fedora core 4 running on AMD64 bit machine. > > Where did you get your R

Re: [R] Analyses of covariation with lme() or lm()

2005-10-18 Thread Spencer Graves
Trial consumes 10 degrees of freedom as a fixed effect in m5 but only 1 degree of freedom as a random effect in m1 and m3. The 11 different Trials are NOT 11 different, completely unrelated entities wiht no relation to one another, as assumed by m5. They are 11 different instances o

[R] ipop (kernlab) gives pars < lower bound ?

2005-10-18 Thread Alexis Diamond
hi everyone, ipop very quickly and accurately identifies the correct parameters in a toy dataset i built, but when i use ipop on the real dataset i get values for the parameters " primal(res) " that are less than zero, even though i specify zero for the lower bound : l = rep(0, length(c)) , whe

[R] JGR help.search

2005-10-18 Thread Brian Haney
If there is a better forum for JGR questions, please redirect me. Whenever I try to open the help browser in JGR (by clicking on Help -> R Help, or by entering help() or help.start() at the console), it pops open a window complaining that a path was not found and that help will not be available, f

[R] cbind/rbind and NULL

2005-10-18 Thread McGehee, Robert
I'm trying to understand why I can rbind but not cbind dataframes to NULLs. For 'cbind' ('rbind'), vectors of zero length (including 'NULL') are ignored unless the result would have zero rows (columns), for S compatibility. (Zero-extent matrices do not occur in S3 and are n

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Tim Churches
Marc Schwartz (via MN) <[EMAIL PROTECTED]> wrote: > > On Wed, 2005-10-19 at 06:47 +1000, Tim Churches wrote: > > Marc Schwartz (via MN) wrote: > > > > > There is also code for the Woolf test in ?mantelhaen.test > > > > Is there? How is it obtained? The documentation on mantelhaen.test in > R >

Re: [R] Finding code for R functions

2005-10-18 Thread Duncan Murdoch
Wolfrum, Ed wrote: > Greetings, > > I am trying to figure out how to find the source code for R functions. I > am specifically interested in finding the code for the "prcomp" > function. I know that typing the function name without parenthesis will > lead to the code (or to a .Internal or .FORTRAN

Re: [R] The meaning of functional language

2005-10-18 Thread Berton Gunter
'functional' languages derive from LISP and the lamda-calculus. These are standard topics in CS computer language courses. You can look them up in Wikipedia, or Google for other sources. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA "The business of the statistician i

Re: [R] The meaning of functional language

2005-10-18 Thread Patrick Burns
ronggui wrote: >It's often heard that the S language is a functional language.But What's the >exact meaning of this termology in the context of S language? > > Here's the idea. If you have: x <- 1:10 f <- function(y) { x <- sin(y / 2); x + y} f(-3:3) then the 'x' inside 'f' does not wipe ou

Re: [R] Finding code for R functions

2005-10-18 Thread Berton Gunter
See chapter 5 on object oriented programming in the R language definition manual. Also the ?UseMethod man page. These will explain R's (S3) method dispatch procedures. Finally, search on CRAN for the R New newsletter article on namespaces, which is where you'll find info on why you can't "see" ce

Re: [R] Defining range of x and y axis in pairs()

2005-10-18 Thread Prof Brian Ripley
Your panel function is missing a ... argument, hence the difference in the two cases. As to why it works, as someone once said, it does `for some value of "work"'. Amongst the many places xlim gets passed is one that set the scale on each panel. Another place it gets sent is to your panel fu

[R] Finding code for R functions

2005-10-18 Thread Wolfrum, Ed
Greetings, I am trying to figure out how to find the source code for R functions. I am specifically interested in finding the code for the "prcomp" function. I know that typing the function name without parenthesis will lead to the code (or to a .Internal or .FORTRAN or .C call). However, I don't

Re: [R] biplot.default

2005-10-18 Thread Prof Brian Ripley
On Tue, 18 Oct 2005, Jungyeon Yoon wrote: > I've been trying to understand biplot. From > getAnywhere(biplot.default), I could get the source code. However, there > is one line that did make sense to me. It's the second line from the > bottom. > > arrow(0, 0, y[,1]*0.8, y[,2]*0.8, col = col[2],...

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Marc Schwartz (via MN)
On Wed, 2005-10-19 at 06:47 +1000, Tim Churches wrote: > Marc Schwartz (via MN) wrote: > > > There is also code for the Woolf test in ?mantelhaen.test > > Is there? How is it obtained? The documentation on mantelhaen.test in R > 2.2.0 contains a note: "Currently, no inference on homogeneity of th

[R] Packages in R and in S-PLUS

2005-10-18 Thread David Smith
Bjørn-Helge Mevik writes: > > tools to make it easy to convert R packages to S-PLUS. > > Not the other way around as well? Actually, we'll be discussing tools to make packages in general that can work in both S-PLUS and R, and also how to make some S-PLUS-only libraries available in an open-sourc

Re: [R] Repeating lines in a data frame

2005-10-18 Thread Sundar Dorai-Raj
Guenther, Cameron wrote: > Hello, > I have a much larger dataset that is similar in form to: > year species length count > 1998 1150 1 > 1998 2200 1 > 1998 3250 2 > 1999 1150 3 > 1999 2200 4 > 1999 3250 5 >

Re: [R] Repeating lines in a data frame

2005-10-18 Thread jim holtman
Try this: > x year species length count 1 1998 1 150 1 2 1998 2 200 1 3 1998 3 250 2 4 1999 1 150 3 5 1999 2 200 4 6 1999 3 250 5 7 2000 1 150 1 8 2000 2 200 1 9 2000 3 250 1 10 2001 1 150 2 11 2001 2 200 3 12 2001 3 250 1 13 2002 1 150 1 14 2002 2 200 2 15 2002 3 250 3 > y <- unlist(lapply(seq(nr

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Tim Churches
Marc Schwartz (via MN) wrote: > There is also code for the Woolf test in ?mantelhaen.test Is there? How is it obtained? The documentation on mantelhaen.test in R 2.2.0 contains a note: "Currently, no inference on homogeneity of the odds ratios is performed." and a quick scan of the source code fo

[R] Defining range of x and y axis in pairs()

2005-10-18 Thread Christian Zinsmeister
Hi, I have a problem to define the range of x and y axis in pairs() for my scatterplots. In low-level plots I can specify that by providing xlim and ylim. This also works for pairs() even if warnings tell me that it doesn't (see below). But if I add upper.panel and/or lower.panel it doesn't work

[R] biplot.default

2005-10-18 Thread Jungyeon Yoon
Hi, I've been trying to understand biplot. From getAnywhere(biplot.default), I could get the source code. However, there is one line that did make sense to me. It's the second line from the bottom. arrow(0, 0, y[,1]*0.8, y[,2]*0.8, col = col[2],) I don't understand why there is a multiplicat

[R] Another question related to box-percentile plot, bpplot(): How to color the "box" or middle half of the data

2005-10-18 Thread xpRt.wannabe
Dear List, A follow-up question related to bpplot() of the Hmisc package: How does one color the "box" , or the middle half of the data, of a box-percentile plot? bpplot(... , col="lightgray") apparently does not work, though boxplot(... , col="lightgray") works. With much appreciation, platform

Re: [R] loading packages - mac user

2005-10-18 Thread Thomas Lumley
On Tue, 18 Oct 2005, Cormac Lawler wrote: > Hi, > I'm using a Mac, I've downloaded R (base), and I'm trying to download > the package R Commander. I thought I had already done this (both from > the web and from within R) but it doesn't seem to be working - it's > not there as a "search()" reveals.

[R] Altering domain & range in an interactive plot using tcl/tk

2005-10-18 Thread Pete Cap
List, I am trying to create a simulated spectrum analyzer in R. The user gets as output a power spectrum (plot of power vs. time). I want the user to be able to change the center frequency (midpoint between xMin and xMax) and window size (distance from xMin to xMax) using sliders in tkrplot. Th

Re: [R] sample size determination

2005-10-18 Thread Martin Henry H. Stevens
?power.anova.test is designed for 1 way models. I would be intrigued to found out more about power in complicated designs. Do look into the archives at http://finzi.psych.upenn.edu/search.html In the past, I used power.t.test on individual model coefficients, though I am not sure it was cor

Re: [R] Repeating lines in a data frame

2005-10-18 Thread Martin Henry H. Stevens
See ?order, e.g., (a <- expand.grid(1998:2000,1:2,1:3)) attach(a) (b <- a[order(Var1,Var3,Var2),]) Hank On Oct 18, 2005, at 3:20 PM, Guenther, Cameron wrote: > Hello, > I have a much larger dataset that is similar in form to: > year species length count > 1998 1150 1 > 1998

[R] sample size determination

2005-10-18 Thread Chris Behr
Hello, I am a new user of R and trying to assess the sample size for data that is being collected on water quality at sites across a wide geographic region. A preliminary set of data has been collected and I would like to use it to assess whether we are collecting enough data and in the right plac

[R] getting an aggregate count, and adding it to a dataset as a new column

2005-10-18 Thread t c
I have the data below in a dataset called “test3”. What is the easiest way to get a count, by date, of all numerical values of var1, and to then add this count to the “test3 “dataset as a new “column”? What I have: date,var1,cat 1/1/2005,5,a 1/1/2005,12,a 1/1/2005,44,b 2/1/2005,1,

Re: [R] loading packages - mac user

2005-10-18 Thread Cormac Lawler
In the Mac version, there is no Packages>Load Packages as there is in the PC version - instead there is the Package manager, which rejects my attempts to download Rcmdr (it loads other packages ok, like boot, graphics etc.) That was the error message I pasted at the end of my mail - this makes me t

[R] Repeating lines in a data frame

2005-10-18 Thread Guenther, Cameron
Hello, I have a much larger dataset that is similar in form to: year species length count 1998 1150 1 1998 2200 1 1998 3250 2 1999 1150 3 1999 2200 4 1999 3250 5 2000 1150 1 2000 220

[R] sample size determination

2005-10-18 Thread Chris Behr
Hello, I am a new user of R and trying to assess the sample size for data that is being collected on water quality at sites across a wide geographic region. A preliminary set of data has been collected and I would like to use it to assess whether we are collecting enough data and in the right plac

Re: [R] Peculiar behaviour subtracting from named numeric vector

2005-10-18 Thread Sundar Dorai-Raj
Hi, Rich, This comes up so much it is FAQ 7.31. http://cran.r-project.org/doc/FAQ/R-FAQ.html --sundar Rich Grenyer wrote: > Hi - I'm just puzzling over something R's been doing when subtracting a > constant from a named numeric vector. I hope this isn't anything > embarrassingly simple, but I

[R] Peculiar behaviour subtracting from named numeric vector

2005-10-18 Thread Rich Grenyer
Hi - I'm just puzzling over something R's been doing when subtracting a constant from a named numeric vector. I hope this isn't anything embarrassingly simple, but I've tried and failed the usual searches. For the last item in my vector, 40-21=19, but 40-40 = 7.105E-15 . If I replace the last i

Re: [R] Solid and dotted lines saving an xyplot

2005-10-18 Thread Prof Brian Ripley
You are not `saving' an xyplot, but re-plotting on a different device. Different trellis devices have different default settings: you did not mention that the backgound had changed from grey to white (but it has). Try trellis.device(color=FALSE) to get on screen what you see on paper, or use tr

[R] loading packages - mac user

2005-10-18 Thread Cormac Lawler
Hi, I'm using a Mac, I've downloaded R (base), and I'm trying to download the package R Commander. I thought I had already done this (both from the web and from within R) but it doesn't seem to be working - it's not there as a "search()" reveals. However, there are plenty of files on my system link

[R] R/Splus Courses *** Las Vegas and San Francisco, In November 2005

2005-10-18 Thread elvis
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce 2-day "R/S-plus Fundamentals and Programming Techniques" . www.xlsolutions-corp.com/Rfund.htm San Francisco October 31st - November 1st, 2005 Las Vegas - Novem

[R] Solid and dotted lines saving an xyplot

2005-10-18 Thread Camarda, Carlo Giovanni
Dear R-users, I would a small problem saving a graph with postscript after using xyplot. Whereas in the R-screen the two lines are solid, once the image is saved as .eps file the second lines (blue in the following example) is dotted. Here there is a simple example. Thanks in advance for your help,

Re: [R] Installing Bioconductor on R

2005-10-18 Thread Peter Dalgaard
Arunkumar R <[EMAIL PROTECTED]> writes: > hi all, >Am new to R. I am having problems installing Bioconductor package > in > R on fedora core 4 running on AMD64 bit machine. Where did you get your R and which version? This is not happening to me with R-2.2.0 from Fedora Extras: gcc

[R] predictive interval in nlme

2005-10-18 Thread Cunningham Kerry
Suppose I have the following data: y x id 44 0 104 48 58 104 48 55 204 47 105 204 41 275 206 18 67 209 ... I fit the model >fit=lme(y~x+I(x^2),random=~1|id) Now I want to make a prediction plot: >time=seq(0,300,len=100) >plot(predict(fit,data.frame(x=time),level=0)) Very fine. It gives me

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Tuszynski, Jaroslaw W.
Try "Breslow OR Breslowday filetype:R -robol" search in Google. Jarek \ Jarek Tuszynski, PhD. o / \ Science Applications International Corporation <\__,| (703) 676-4192 ">

[R] Installing Bioconductor on R

2005-10-18 Thread Arunkumar R
hi all, Am new to R. I am having problems installing Bioconductor package in R on fedora core 4 running on AMD64 bit machine. this is the error message I get : gcc -shared -L/usr/local/lib -o affyPLM.so avg_log.o biweight.o chipbackground.o common_types.o do_PLMrlm.o do_PLMrma.o do_P

[R] bayesian network

2005-10-18 Thread 马传香
r-help-request,您好! Hello! I am a R user. recently,I am using Bayesian Network to inference posterior.but,I don't know how to input prior probability and inference posterior.I tried "prob" function,but fail.Can you help me? Thanks! ChuanXiang Ma

Re: [R] hist of dates

2005-10-18 Thread Prof Brian Ripley
Pleae see ?hist.Date for how to use it, as you usage is nothing like the examples there. However, I suspect you do not want a histogram but a barplot, as in with(dt_cycles, barplot(cycles, names=as.character(dates_releves))) (You may want to adjust the font size or date format. On Tue, 18 O

Re: [R] hist of dates

2005-10-18 Thread Berton Gunter
hist.Date is not exported from its namespace. Try RSiteSearch('namespace') to learn more about this (look for the R News article). As you saw, hist() will dispatch hist.Date() when it is given a date-time argument. Read the docs again -- you failed to specify the breaks = ... argument properly.

Re: [R] Classification tree data structure

2005-10-18 Thread Hades
That's most helpful. Thank you very much for your time. Best regards, Maria On Tue Oct 18 17:18 , Prof Brian Ripley <[EMAIL PROTECTED]> se nt: On Tue, 18 Oct 2005, > Hi there, > > I am growing classification trees using the 'tree' p add-on to

Re: [R] Classification tree data structure

2005-10-18 Thread Prof Brian Ripley
On Tue, 18 Oct 2005, Hades wrote: > Hi there, > > I am growing classification trees using the 'tree' package add-on to R. > > I would like to convert the 'R' output to the SAS format used by Salford > Systems' commercial CART software in order to interface with some > other software. > > My quest

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Thomas Lumley
On Wed, 19 Oct 2005, Tim Churches wrote: > MJ Price, Social Medicine wrote: >> I have been trying to find a function to calculate the Breslow-Day test for >> homogeneity of the odds ratio in R. I know the test can be preformed in SAS >> but i was wondering if anyone could help me to perform this i

[R] hist of dates

2005-10-18 Thread [EMAIL PROTECTED]
Hi all I wish to draw an histogram... with dates but the following append, i don't know where is the problem, help(hist.Date) works and i don't see any usefull information on what i'm doing wrong... > hist.Date(dt_cycles) Error: couldn't find function "hist.Date" > hist.date(dt_cycles) Error: c

Re: [R] p-value calculation

2005-10-18 Thread Don MacQueen
> 1-pchisq(1.2654,1) [1] 0.2606314 -Don At 5:13 PM +0200 10/18/05, richard mendes wrote: >hello everybody > >i'm very new at using R so probably this is a very stupid question. >I have a problem calculating a p-value. When i do this with excel i >can use the method CHIDIST for 1.2654 with 1 free

Re: [R] p-value calculation

2005-10-18 Thread Nordlund, Dan
Look at ?pchisq Daniel Nordlund Bothell, WA > -Original Message- > From: [EMAIL PROTECTED] [mailto:r-help- > [EMAIL PROTECTED] On Behalf Of richard mendes > Sent: Tuesday, October 18, 2005 8:13 AM > To: R-help@stat.math.ethz.ch > Subject: [R] p-value calculation > > hello everybody > >

Re: [R] p-value calculation

2005-10-18 Thread Peter Dalgaard
richard mendes <[EMAIL PROTECTED]> writes: > hello everybody > > i'm very new at using R so probably this is a very stupid question. > I have a problem calculating a p-value. When i do this with excel i > can use the method CHIDIST for 1.2654 with 1 freedom degree i get the > answer 0.261 > > i

Re: [R] p-value calculation

2005-10-18 Thread ronggui
> pchisq(1.2654,df=1,low=F) [1] 0.2606314 === 2005-10-18 23:13:20 您在来信中写道:=== >hello everybody > >i'm very new at using R so probably this is a very stupid question. >I have a problem calculating a p-value. When i do this with excel i >can use the method CHIDIST for 1.2654 with 1 freedom

Re: [R] p-value calculation

2005-10-18 Thread Robert Kinley
> pchisq(1.2654,1) [1] 0.7393686 looks like excel gave you the other tail bob kinley richard mendes <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 18/10/2005 16:13 To R-help@stat.math.ethz.ch cc Subject [R] p-value calculation hello everybody i'm very new at us

Re: [R] p-value calculation

2005-10-18 Thread Marc Schwartz (via MN)
On Tue, 2005-10-18 at 17:13 +0200, richard mendes wrote: > hello everybody > > i'm very new at using R so probably this is a very stupid question. > I have a problem calculating a p-value. When i do this with excel i > can use the method CHIDIST for 1.2654 with 1 freedom degree i get the > answer

Re: [R] Lattice graphics strip labels for shingles

2005-10-18 Thread Greg Snow
Does the strip.shingle function in the TeachingDemos package do what you want? Greg Snow, Ph.D. Statistical Data Center, LDS Hospital Intermountain Health Care [EMAIL PROTECTED] (801) 408-8111 >>> "Kiermeier, Andreas (PIRSA - SARDI)" <[EMAIL PROTECTED]> 10/18/05 12:02AM >>> Dear all, back in 200

[R] p-value calculation

2005-10-18 Thread richard mendes
hello everybody i'm very new at using R so probably this is a very stupid question. I have a problem calculating a p-value. When i do this with excel i can use the method CHIDIST for 1.2654 with 1 freedom degree i get the answer 0.261 i just want to do the same thing in R but i can't find a metho

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Marc Schwartz (via MN)
On Tue, 2005-10-18 at 14:27 +0100, MJ Price, Social Medicine wrote: > Dear all, > > I have been trying to find a function to calculate the Breslow-Day test for > homogeneity of the odds ratio in R. I know the test can be preformed in SAS > but i was wondering if anyone could help me to perform t

Re: [R] Subsetting a list

2005-10-18 Thread Arturo Coral Alamo
Hi, you can use this: TEST[[3]]<-NULL > TEST [[1]] [1] "A1" "A2" [[2]] [1] "B1" "B2" Saludos Jaime Arturo Coral student PUCP - PERU On 10/18/05, Dennis Fisher <[EMAIL PROTECTED]> wrote: > > Colleagues, > > I have created a list in the following manner: > TEST <- list(c("A1", "A2"), c("B1",

Re: [R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread Tim Churches
MJ Price, Social Medicine wrote: > I have been trying to find a function to calculate the Breslow-Day test for > homogeneity of the odds ratio in R. I know the test can be preformed in SAS > but i was wondering if anyone could help me to perform this in r. I don't recall seeing the Breslow-Day t

Re: [R] Subsetting a list

2005-10-18 Thread Dimitris Rizopoulos
you need single brackets, i.e., TEST <- list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2")) TEST[-c(1, 3)] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgiu

Re: [R] Subsetting a list

2005-10-18 Thread ernesto
Dennis Fisher wrote: >Colleagues, > >I have created a list in the following manner: > TEST<- list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2")) > >I now want to delete one element from the list, e.g., the third. The >command > TEST[[3]] >yields (as expected): > [1] "C1" "C2" > >T

Re: [R] Subsetting a list

2005-10-18 Thread Huntsinger, Reid
You have to use "[" instead of "[[" to return a sub-list. Reid Huntsinger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Fisher Sent: Tuesday, October 18, 2005 10:12 AM To: r-help@stat.math.ethz.ch Subject: [R] Subsetting a list Colleagues, I h

Re: [R] Subsetting a list

2005-10-18 Thread Duncan Murdoch
On 10/18/2005 10:11 AM, Dennis Fisher wrote: > Colleagues, > > I have created a list in the following manner: > TEST<- list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2")) > > I now want to delete one element from the list, e.g., the third. The > command > TEST[[3]] > yields (as exp

[R] AR(1) with NLME

2005-10-18 Thread Robert Schneider
I am trying to calibrate a non linear mixed model with a AR(1) autocorrelation structure. This structure is indicated by the ACF plot. When calibrating the model without the AR(1), everything comes out nicely. However, when the AR(1) structure is included in the model, the Phi parameter estimate co

[R] Subsetting a list

2005-10-18 Thread Dennis Fisher
Colleagues, I have created a list in the following manner: TEST<- list(c("A1", "A2"), c("B1", "B2"), c("C1", "C2")) I now want to delete one element from the list, e.g., the third. The command TEST[[3]] yields (as expected): [1] "C1" "C2" The command TEST[[-3]] yields:

Re: [R] The meaning of functional language

2005-10-18 Thread hadley wickham
> It's often heard that the S language is a functional language.But What's the > exact meaning of this termology in the context of S language? For general computer science definitions, wikipedia is normally useful: http://en.wikipedia.org/wiki/Functional_language Hadley ___

[R] Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio

2005-10-18 Thread MJ Price, Social Medicine
Dear all, I have been trying to find a function to calculate the Breslow-Day test for homogeneity of the odds ratio in R. I know the test can be preformed in SAS but i was wondering if anyone could help me to perform this in r. In addition i have the fullrefman file to search for functions in t

Re: [R] problems with device drivers postscript() and pdf()

2005-10-18 Thread Roger Bivand
On Tue, 18 Oct 2005, Sibylle Matthes wrote: > > Dear R-help, > We are using the Platform AMD 64 Bit Opteron. > Our operating system is SUSE LINUX ENTERPRISESERVER SLES9.0 > We are using R version 2.2.0 . > This is our problem: > None of the device drivers postscript() or pdf() is opening, e.g. >

[R] Classification tree data structure

2005-10-18 Thread Hades
Hi there, I am growing classification trees using the 'tree' package add-on to R. I would like to convert the 'R' output to the SAS format used by Salford Systems' commercial CART software in order to interface with some other software. My question is: How can I parse the R tree data structure

[R] Data Mining Conference, Southern California, March 2006

2005-10-18 Thread Lisa Solomon
SALFORD SYSTEMS DATA MINING CONFERENCE 2006 San Diego, California, March 29-31, 2006 Focusing on the Contributions of Data Mining to Solving Real-World Challenges Business, Biomedical and Environmental Real-World Case Study Presentations TOPICS INCLUDE: Credit Risk Modeling; Targeted Marketing a

[R] The meaning of functional language

2005-10-18 Thread ronggui
It's often heard that the S language is a functional language.But What's the exact meaning of this termology in the context of S language? 2005-10-18 -- Deparment of Sociology Fudan University Blog:http://sociology.yculblog.com __

[R] problems with device drivers postscript() and pdf()

2005-10-18 Thread Sibylle Matthes
Dear R-help, We are using the Platform AMD 64 Bit Opteron. Our operating system is SUSE LINUX ENTERPRISESERVER SLES9.0 We are using R version 2.2.0 . This is our problem: None of the device drivers postscript() or pdf() is opening, e.g. the following message is coming: postscript("splines-Ex.ps")

[R] Ways to speed up R code?

2005-10-18 Thread ecoinfo
Hi, I should read R-help archives more carefully. According to your link, I searched in Google and found another pdf: http://www.demog.berkeley.edu/~boe/Rstuff/R-fundamentalsLumleyBates/R-fundamentalsLumleyBates.pdf Thanks for your advice, Xiaohua On 10/18/05, Thomas Schönhoff <[EMAIL PROTECTE

Re: [R] How to speed up R code?

2005-10-18 Thread Duncan Murdoch
Martin Lam wrote: > Hi, > > I have written a piece of code, which is a variant of > the random forest (rf) package algorithm, entirely in > R. I know that some of the code in the rf package is > written in c or c++. The problem is that the execution > of my code in R takes a lot of time. To give y

[R] How to speed up R code?

2005-10-18 Thread Martin Lam
Hi, I have written a piece of code, which is a variant of the random forest (rf) package algorithm, entirely in R. I know that some of the code in the rf package is written in c or c++. The problem is that the execution of my code in R takes a lot of time. To give you an example, the building and

Re: [R] Ways to speed up R code?

2005-10-18 Thread Patrick Burns
What might be most likely for misunderstanding is "Patrick's book" since my message was private. The book is S Poetry. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") ecoinfo wrote: >Sorry for my poor Englis

Re: [R] Ways to speed up R code?

2005-10-18 Thread ecoinfo
Sorry for my poor English. One sentence in my last emails should be "Furthermore, I need a general instruction (e.g. Patrick's book and Duncan's rules) instead of pieces". Hope I was not misunderstood. Thanks for Patrick and Duncan's useful replies. Xiaohua On 10/18/05, ecoinfo <[EMAIL PROTECTED]

Re: [R] Ways to speed up R code?

2005-10-18 Thread ecoinfo
RSiteSearch("speed up R code") == search for a page having the words (speed, up, R, and code) surely R is found everywhere. Although there are some useful archives, many of them are not. Furthermore, I need a general instruction instead of pieces (e.g. Patrick's book and Duncan's rules) If I use "

Re: [R] change factor labels

2005-10-18 Thread Dimitris Rizopoulos
one way is to use: levels(test$x) <- c("u", "v") I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http

[R] change factor labels

2005-10-18 Thread Sebastian Leuzinger
it must be terribly simple, can someone quickly help me? test <- data.frame(y=c(1:10), x=as.factor(c(rep("a",5),rep("b",5 how can i change the factor labels from "a" and "b" to for example "u" and "v"? i don't succeed with factor() thanks a lot ---

Re: [R] Ways to speed up R code?

2005-10-18 Thread Thomas Schönhoff
Hello, 2005/10/18, ecoinfo <[EMAIL PROTECTED]>: > Hi R-users: > > Yesterday I ran a R code for 9 hours and it did not show any sign to > stop. Then I interrupted it and found it had completed 82.5%. > > This morning I decided to wait for another 11 hours to see what will > happen. Wait a minute,

Re: [R] Ways to speed up R code?

2005-10-18 Thread Duncan Murdoch
ecoinfo wrote: > Hi R-users: > > Yesterday I ran a R code for 9 hours and it did not show any sign to > stop. Then I interrupted it and found it had completed 82.5%. > > This morning I decided to wait for another 11 hours to see what will > happen. Wait a minute, I heard that transforming data.fr

Re: [R] Insightful Announces: "R and S-PLUS- Panel Discussion" at 9th Annual 2005 User Conference

2005-10-18 Thread Bjørn-Helge Mevik
Michael O'Connell wrote: > tools to make it easy to convert R packages to S-PLUS. Not the other way around as well? -- Bjørn-Helge Mevik __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] RMySQL problems

2005-10-18 Thread Christian Schulz
Hi, i have recently same problems, but when i add a new user without password it works, but i could not recognize why the user with password didn't work. After a new mysql (Win-XP mysqll 5.0.13 rc ) installation it works normal. regards, christian DBI version 0.1-9 RMySQL 0.5-5 _

[R] Ways to speed up R code?

2005-10-18 Thread ecoinfo
Hi R-users: Yesterday I ran a R code for 9 hours and it did not show any sign to stop. Then I interrupted it and found it had completed 82.5%. This morning I decided to wait for another 11 hours to see what will happen. Wait a minute, I heard that transforming data.frame to matrix will make R cod

[R] RMySQL problems

2005-10-18 Thread Roeland Hancock
I get the following error trying to connect to a MySQL database: > library(RMySQL) Loading required package: DBI > drv<-dbDriver("MySQL") > con<-dbConnect(drv, user="hothand", password=xxx, host="localhost", dbname="hh03"); Error in mysqlNewConnection(drv, ...) : RS-DBI driver: (could not c