Re: [R] How to force a vector to be column or row vector?

2006-02-02 Thread Gabor Grothendieck
Try this: rbind(c(x)) cbind(c(x)) t(c(x)) On 2/2/06, Michael [EMAIL PROTECTED] wrote: Hi all, I tended to use rbind, or cbind to force a vector be be deemed as a column or row vector. This is very important if I want to do things like u' * A * u, where u' is a row vector and u is a column

[R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Michael
Hi all, How do I visualize a contour of a tri-variate normal distribution? I just like to see the ellipsoid very much. I hope there is a easy way or existing method in R. Thank you a lot! Michael. [[alternative HTML version deleted]] __

Re: [R] Randomised Block Design

2006-02-02 Thread Christoph Buser
Hi try ?aov That's a good starting point with references to other functions in R and some literature. Regards, Christoph Buser -- Christoph Buser [EMAIL PROTECTED] Seminar fuer Statistik, LEO C13 ETH (Federal Inst. Technology) 8092

Re: [R] How to force a vector to be column or row vector?

2006-02-02 Thread Martin Lam
Hi, Perhaps you should try the transpose function t(). It converts a row into a column and vice versa. HTH, Martin Lam --- Michael [EMAIL PROTECTED] wrote: Hi all, I tended to use rbind, or cbind to force a vector be be deemed as a column or row vector. This is very important if I want

Re: [R] GetBioC install issue

2006-02-02 Thread Uwe Ligges
Roth, Richard wrote: Hi, I am trying to install the BioC package from bioconductor onto a Windows Server 2003 machine. I can connect to bioconductor and when I run the getBioC(affy,release) function it starts to download but then it stops with the following error: Error: unable to

Re: [R] 3d from file

2006-02-02 Thread Robin Hankin
Hi try p3d() in package onion. HTH rksh On 1 Feb 2006, at 17:57, andrea valle wrote: Dear all, sorry if it's obvious but I wasn't able to find a solution by myself. I have a text file filled with 3 colums representing xyz coodinates (i.e. positions) of an objects. Can I have in R a

[R] calculating IC50

2006-02-02 Thread Arne.Muller
Hello, I was wondering if there is an R-package to automatically calculate the IC50 value (concentration of a substrance that inhibits cell growth to 50%) for some measurements. kind regards, Arne [[alternative HTML version deleted]]

Re: [R] memory limit in aov

2006-02-02 Thread Lucy Crooks
Thanks for your reply. Thanks for info on aov-hadn't been able to tell which to use from help pages. There are no random effects so will switch to lm(). The data are amino acid sequences, with factor being position and level which amino acid is present. There are indeed an average of

Re: [R] calculating IC50

2006-02-02 Thread Prof Brian Ripley
On Thu, 2 Feb 2006 [EMAIL PROTECTED] wrote: I was wondering if there is an R-package to automatically calculate the IC50 value (concentration of a substrance that inhibits cell growth to 50%) for some measurements. Function dose.p in recommended package MASS. -- Brian D. Ripley,

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Duncan Murdoch
On 2/2/2006 3:39 AM, Michael wrote: Hi all, How do I visualize a contour of a tri-variate normal distribution? I just like to see the ellipsoid very much. I hope there is a easy way or existing method in R. The misc3d package includes a function for 3d contour plots; that should do what

[R] ANNOUNCEMENT: 20% discount on new R books from Chapman Hall/CRC

2006-02-02 Thread Robert.Calver
20% discount on four new R books from Chapman Hall/CRC Chapman and Hall/CRC is pleased to announce the publication of four new books on R, all available through our website at 20% discount to users of R. To take advantage of this permanent offer, which is valid across all of our R books,

[R] Request for users of my R-Tcl/Tk examples, limmaGUI or affylmGUI

2006-02-02 Thread James Wettenhall
[PLEASE REPLY _OFF_ THE LIST, i.e. DON'T CC to [EMAIL PROTECTED] Hi, I don't see this sort of thing very often on the mailing lists, so list moderators and others should feel free to tell me if it breaches list etiquette and/or delete my post if necessary. But I can't see what harm it could

[R] error message in cox regression cph()

2006-02-02 Thread May, Roel
Hi, I have been trying to get the cph() function of the Design package to work but get an error message I don't understand: Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed I have tried the same for a dummy dataset I made, and than it

Re: [R] Request for users of my R-Tcl/Tk examples, limmaGUI or affylmGUI

2006-02-02 Thread David Firth
I have used your R-Tcl/Tk Examples. (Thanks! The ideas were much appreciated.) I am from the United Kingdom. David -- Professor David Firth http://www.warwick.ac.uk/go/dfirth __ R-help@stat.math.ethz.ch mailing list

[R] readline detection problems

2006-02-02 Thread Benjamin Otto
Dear community, I'm trying to install R-2.2.1 on an IRIX 6.2 (Unix System V Release 4) system without root access. Unfortunately readline is not installed in default, so I installed it locally in my home directory, more precisely in: $HOME/vol/readline-5.1, where $HOME is /home3/fa/faga001.

Re: [R] Request for users of my R-Tcl/Tk examples, limmaGUI or affylmGUI

2006-02-02 Thread David Firth
On Thursday 02 February 2006 12:53, you wrote: ... [PLEASE REPLY _OFF_ THE LIST, i.e. DON'T CC to [EMAIL PROTECTED] oops! I just realised that I hit the wrong button and replied to r-help just now... Sorry! I guess that *is* one of the perils of sending a request such as this to a mailing

Re: [R] norm package prelim.norm

2006-02-02 Thread Leo Gürtler
(Ted Harding) schrieb: Dear Elizabeth, the R-package mice has ?md.pattern and Hmisc also contains some software to describe missing data. I think both do not have limitations like prelim.norm. best wishes, leo On 01-Feb-06 Ted Harding wrote: On 01-Feb-06 Elizabeth Lawson wrote:

Re: [R] error message in cox regression cph()

2006-02-02 Thread Frank E Harrell Jr
May, Roel wrote: Hi, I have been trying to get the cph() function of the Design package to work but get an error message I don't understand: Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed I have tried the same for a dummy

Re: [R] calculating IC50

2006-02-02 Thread Liaw, Andy
Perhaps also of interest is the `drc' package on CRAN. There's an article in JSS describing it (probably the same as the package vignette--- haven't checked). Andy From: Prof Brian Ripley On Thu, 2 Feb 2006 [EMAIL PROTECTED] wrote: I was wondering if there is an R-package to

[R] Significance of degrees of freedom in nlme

2006-02-02 Thread gabriela escati peñaloza
Dear Dr. Bates, Thank you very much for your response. I had consulted the algorithm described in Pinheiro and Bates. However, what I don't understand (among other things) is why my two parameters appear to be estimated at different grouping levels (based on the DF values). Affect this different

[R] Matrix variable in C code

2006-02-02 Thread depire
Dear all, I try to compute some piece of my R code in C. My problem is about matrix. My code in R is the following: = VPEfron-function(XType,ZType,dX,G,c0,c1) { XS-sort(XType) rang-sort.list(XType) ZS-matrix(0,k,max(dX))

[R] Help with ldBands(Hmisc)

2006-02-02 Thread Lakshminarayanan, Mani
Hello My Fellow Users, Under the details it is given that the ld98 executable should be in a subdirectory that is in the system. Should ld98.exe be included under Hmisc (where it is stored) or under the lib subdirectory within Hmisc? I am getting the following error message: Error in (head +

Re: [R] Date Not Staying in Date Format

2006-02-02 Thread Prof Brian Ripley
tapply(df$Date, df$SomeFactor, max, simplify=FALSE) works, i.e. it is the unlist() which is losing the class (and perhaps unlist or tapply should be a bit cleverer). On Mon, 30 Jan 2006, David Randel wrote: I have a column in a data frame that has a class of Date and a mode of numeric. When

Re: [R] How to force a vector to be column or row vector?

2006-02-02 Thread Liaw, Andy
From: Gabor Grothendieck Try this: rbind(c(x)) cbind(c(x)) t(c(x)) The c() is not needed above. Also, this might be a better way of computing a quadratic form: x - 1:3 m - matrix(sample(1:9), 3, 3) crossprod(crossprod(m, x), x) [,1] [1,] 202 t(x) %*% m %*% x # Just

Re: [R] Matrix variable in C code

2006-02-02 Thread Gabor Csardi
On Thu, Feb 02, 2006 at 03:11:42PM +0100, [EMAIL PROTECTED] wrote: [...] and my test code in C is: SEXP VPCEfron(SEXP f, SEXP SR, SEXP ZR, SEXP DIR, SEXP nsR, SEXP rho) { int taille=INTEGER(nsR)[0]; [...] All works, except ZS, the

Re: [R] memory limit in aov

2006-02-02 Thread Liaw, Andy
I don't know what the goal of the analysis is, but I have a suspicion that the `gbm' package might be a more fruitful way... Cheers, Andy From: Lucy Crooks Thanks for your reply. Thanks for info on aov-hadn't been able to tell which to use from help pages. There are no random effects so

Re: [R] calculating IC50

2006-02-02 Thread Christian Ritz
Hi! Yes, the 'drc' package can be used to obtain IC50 or any other ICx value for several, commonly used dose-response models. The vignette is more up-to-date than the article in JSS (which dates back to the start of 2005). Christian Liaw, Andy wrote: Perhaps also of interest is the `drc'

Re: [R] How to force a vector to be column or row vector?

2006-02-02 Thread Gabor Grothendieck
On 2/2/06, Liaw, Andy [EMAIL PROTECTED] wrote: From: Gabor Grothendieck Try this: rbind(c(x)) cbind(c(x)) t(c(x)) The c() is not needed above. The poster asked for an expression that would work regardless of the original form of the vector -- row, column or neither. The c gets

[R] Handling survey data issue

2006-02-02 Thread Walter R. Paczkowski
Good morning, I have a survey from a client that has a variable, say number of pills taken per day, that is coded as a numeric - in part. The survey respondents were asked to state the number of pills and this number was recorded. But, for those who took more than 10, the answer was

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Ben Bolker
Duncan Murdoch murdoch at stats.uwo.ca writes: On 2/2/2006 3:39 AM, Michael wrote: Hi all, How do I visualize a contour of a tri-variate normal distribution? I just like to see the ellipsoid very much. I hope there is a easy way or existing method in R. The misc3d package

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread John Fox
Dear Michael, Some time ago, I posted to r-help a solution to a problem very close to this, which adapts the scatter3d() function in the Rcmdr package so that it plots concentration ellipsoids. You'll find the code at http://finzi.psych.upenn.edu/R/Rhelp02a/archive/61156.html. I hope this helps,

Re: [R] 15-min mean values

2006-02-02 Thread bogdan romocea
Here's another approach which can be easily implemented in SQL. 1. Start with the dates as character vectors, dt - as.character(Sys.time()) 2. Extract the minutes and round them to 0,15,30,45: minutes - floor(as.numeric(substr(dt,15,16))/15)*15 final.mins - as.character(minutes)

[R] How to get the namespace of a function?

2006-02-02 Thread Fernando Saldanha
I declared the environment of the function myfun to be NULL as follows: environment(myfun) - NULL Later on I called that myfun and got an error message because the function index() in the zoo package was called inside myfun and was not visible: Error in myfun(args) : couldn't find function

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
Try: f - function() get(index, package:zoo) On 2/2/06, Fernando Saldanha [EMAIL PROTECTED] wrote: I declared the environment of the function myfun to be NULL as follows: environment(myfun) - NULL Later on I called that myfun and got an error message because the function index() in the zoo

Re: [R] sort columns

2006-02-02 Thread Rau, Roland
Hi, is this what you were looking for? sort(c(v1, v9090, v910, v990, v908)) [1] v1v908 v9090 v910 v990 library(gtools) mixedsort(c(v1, v9090, v910, v990, v908)) [1] v1v908 v910 v990 v9090 Best, Roland -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[R] re-coding variables

2006-02-02 Thread Marc Bernard
Dear All, I wonder how to re-code a categorical variable without using the ifelse loops. For example: Let X be a categorical variable with 6 levels, levels(X) = c(1,2,3,4,5,6) How to create a new categorical variable Y with levels, 10,11,12, say , such that: Y = 10 if X =1 or

[R] Training: Approaches to Statistical Modelling with Dr. Bill Venables

2006-02-02 Thread Kathy Kiely
Subject : Training with Dr. Bill Venables Traditional and Modern Approaches to Statistical Modelling Insightful are pleased to announce Bill Venables is giving three courses in Europe within the next 6 weeks : Dates and Locations Feb 20 - 22 :Basingstoke - UK Feb 27 - Mar1: Zurich -

Re: [R] re-coding variables

2006-02-02 Thread Christos Hatzis
Look at function recode() in library(car). -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Bernard Sent: Thursday, February 02, 2006 11:12 AM To: r-help@stat.math.ethz.ch Subject: [R] re-coding variables Dear All, I wonder how to

[R] problem with nnet

2006-02-02 Thread madhurima bhattacharjee
Hello All, I am working with samr and nnet packages. I am following the steps given below: 1 I take a input file with signal values for 9506 genes and 36 chips , belonging to two classes. 2 I perform samr analysis on 80% of chip data from both the classes.(selected by random sampling) 3 I

Re: [R] re-coding variables

2006-02-02 Thread Peter Dalgaard
Marc Bernard [EMAIL PROTECTED] writes: Dear All, I wonder how to re-code a categorical variable without using the ifelse loops. For example: (What's an ifelse loop???) Let X be a categorical variable with 6 levels, levels(X) = c(1,2,3,4,5,6) How to create a new

[R] the meaning of the B-spline coefficients

2006-02-02 Thread liufang
Dear all, I'm trying to figure out the exact meaning of the B-spline coefficients generated by the R command bs(). After reading a lot of things, I still have no clue... Here's my data. test timef0 1 1 94.76328 2 2 102.47954 3 3 105.01234 4 4 107.21387 5 5

Re: [R] Matrix variable in C code

2006-02-02 Thread depire
Selon Gabor Csardi [EMAIL PROTECTED]: On Thu, Feb 02, 2006 at 03:11:42PM +0100, [EMAIL PROTECTED] wrote: [...] and my test code in C is: SEXP VPCEfron(SEXP f, SEXP SR, SEXP ZR, SEXP DIR, SEXP nsR, SEXP rho) { int

Re: [R] non linear 3SLS with constraints

2006-02-02 Thread Spencer Graves
RSiteSearch(3SLS) produced 27 hits for me just now. This identified several functions in contributed packages that offer 3SLS. I didn't look at all of them, but I didn't see any mention of constraints in the ones I skimmed. RSiteSearch(nonlinear least squares with constraints)

Re: [R] the meaning of the B-spline coefficients

2006-02-02 Thread Berton Gunter
Check out: **The Elements of Statistical Learning ** by Hastie, Tibshirani, and Friedman. -- Bert Gunter Genentech -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, February 02, 2006 8:48 AM To: r-help@stat.math.ethz.ch

Re: [R] Matrix variable in C code

2006-02-02 Thread Gabor Csardi
On Thu, Feb 02, 2006 at 06:27:47PM +0100, [EMAIL PROTECTED] wrote: [...] The problem is that as.double drops the dim attribute: b - matrix( 1:4, 2, 2) b [,1] [,2] [1,]13 [2,]24 as.double(b) [1] 1 2 3 4 You can try: b - matrix( 1:4, 2, 2) d - dim(b) b - as.double(b)

[R] how to use mle?

2006-02-02 Thread ronggui
Y [,1] [,2] [,3] [1,]010 [2,]010 [3,]001 [4,]100 [5,]001 [6,]001 [7,]100 [8,]100 [9,]001 [10,]100 X pri82 pan82 1 0 0 2 0 0 3 1 0 4

[R] R training courses

2006-02-02 Thread Walker, Russell
Hi All, I am interested in learning about people's experience with R training or courses. What worked, what didn't? What do you recommend? Also, if there any groups or individuals that have and can offer R training courses, please contact me directly. I would like to learn about your

Re: [R] R training courses

2006-02-02 Thread Wei Qiu
I am also looking for this kind of courses. Any suggestion will be greatly appreciated. Lucy On Thu, 2 Feb 2006, Walker, Russell wrote: Hi All, I am interested in learning about people's experience with R training or courses. What worked, what didn't? What do you recommend? Also, if

[R] Heatmap.2 axes question

2006-02-02 Thread Joseph Retzer
I'm suppressing the labeling of my rows and columns in heatmap.2 using the commands: labRow = , labCol = But I'd like to annotate them again using the axis command: axis(1, at=seq(500, 1000, 500)) mtext(Group 1, Group 2) For some reason however it appears that the

Re: [R] R training courses

2006-02-02 Thread roger bos
Elvis advertises to this list quite regularly. I took an S+ course offered by Insightful once. It was okay, but not great. For the basics, the best thing is just to sit down with a book (S Poetry comes to mind) and follow the examples. For more advanced stuff, learn it as you go. I am. On

[R] table() command

2006-02-02 Thread Taka Matzmoto
Hi R users I am trying to get cross-tabulation tables using tables. All variables used are binary ones (0 and 1). Each time I constructed cross-tabluation table using a different variable pair (e.g., variable 1 and variable 2, variable 1 and variable 3 etc) In doing so, I ran into some

Re: [R] table() command

2006-02-02 Thread Gabor Grothendieck
Create factors from your variables that include the missing levels. e.g. x - factor(c(1,1,1)) x0 - factor(c(1,1,1), levels = 0:1) y - factor(c(0,1,0)) table(x,y) # no zero for x table(x0,y) # zero for x On 2/2/06, Taka Matzmoto [EMAIL PROTECTED] wrote: Hi R users I am trying to get

Re: [R] how to use mle?

2006-02-02 Thread Peter Dalgaard
ronggui [EMAIL PROTECTED] writes: Y [,1] [,2] [,3] [1,]010 [2,]010 [3,]001 [4,]100 [5,]001 [6,]001 [7,]100 [8,]100 [9,]001 [10,]100 X pri82

Re: [R] R training courses

2006-02-02 Thread Luís Torgo
On Thursday 02 February 2006 18:05, Walker, Russell wrote: I am interested in learning about people's experience with R training or courses. What worked, what didn't? What do you recommend? In the last few years I have been doing several short (around 10 hours) courses on Data Mining using R.

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Fernando Saldanha
Thanks, Gabor. I tried this without success: z - ts(1:5) f - function(x) {f1 - function() get(index, package:zoo); f1()(x)} environment(f) - NULL f(z) Error in f1()(x) : no applicable method for index I also tried this, which seemed simpler, with the same outcome: z - ts(1:5) f -

[R] RHOME

2006-02-02 Thread Daniel A. Powers
R-help -- I built R-2.2.1 in my own directory on a sun (solaris). Now I would like the sysadmin to move the contents to /usr/local/lib and place the binary in /usr/local/bin. No problem. However, the RHOME variable defaults to the directory from which R was built so it is not usable by anyone

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Duncan Murdoch
On 2/2/2006 10:56 AM, Fernando Saldanha wrote: I declared the environment of the function myfun to be NULL as follows: environment(myfun) - NULL Since version 2.1.0, it's been recommended that you use environment(myfun) - baseenv() and since 2.2.0, you'll get a warning when using NULL (and

Re: [R] Matrix variable in C code

2006-02-02 Thread depire
Selon Gabor Csardi [EMAIL PROTECTED]: On Thu, Feb 02, 2006 at 06:27:47PM +0100, [EMAIL PROTECTED] wrote: [...] The problem is that as.double drops the dim attribute: b - matrix( 1:4, 2, 2) b [,1] [,2] [1,]13 [2,]24 as.double(b) [1] 1 2 3 4 You can try:

Re: [R] Help with ldBands(Hmisc)

2006-02-02 Thread Frank E Harrell Jr
Lakshminarayanan, Mani wrote: Hello My Fellow Users, Under the details it is given that the ld98 executable should be in a subdirectory that is in the system. Should ld98.exe be included under Hmisc (where it is stored) or under the lib subdirectory within Hmisc? I am getting the

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
It actually did find index -- in fact, the error message is coming from index. I forgot that in this case index is a generic which in turn is calling index.ts and that is what it can't find. How about one of these: library(zoo) f - function(x) eval(substitute(index(x), list(x = x)), + envir =

Re: [R] RHOME

2006-02-02 Thread plummer
Quoting Daniel A. Powers [EMAIL PROTECTED]: R-help -- I built R-2.2.1 in my own directory on a sun (solaris). Now I would like the sysadmin to move the contents to /usr/local/lib and place the binary in /usr/local/bin. No problem. However, the RHOME variable defaults to the directory from

Re: [R] RHOME

2006-02-02 Thread Daniel A. Powers
Thanks -- I was trying not to burden the sysadmin with this task, but it seems that it should be done right. Cheers, Dan =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Daniel A. Powers, Ph.D. Department of Sociology University of Texas at Austin 1 University Station A1700 Austin, TX

Re: [R] fisher table probability

2006-02-02 Thread array chip
Thanks for the suggestion! what if the dimensions of the table is greater than 2, say 3x4? --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 1 Feb 2006, array chip wrote: Hi, is there a way to generate the table's probability when doing the fisher's exact test on a 2x2 table? The

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Michael
shape3d only gives rigid sphere... not the free form ellipsoid that I want... On 2/2/06, Ben Bolker [EMAIL PROTECTED] wrote: Duncan Murdoch murdoch at stats.uwo.ca writes: On 2/2/2006 3:39 AM, Michael wrote: Hi all, How do I visualize a contour of a tri-variate normal

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Michael
Thanks a lot John. Thanks a lot everybody! I guess that I just need an ellipsoid, not contour... in 3D, ... How do I do that most conviniently and efficiently given that I have the covarance matrix for the gaussian density... On 2/2/06, John Fox [EMAIL PROTECTED] wrote: Dear Michael, Some

Re: [R] fisher table probability

2006-02-02 Thread Prof Brian Ripley
On Thu, 2 Feb 2006, array chip wrote: Thanks for the suggestion! what if the dimensions of the table is greater than 2, say 3x4? Look at the references quoted on the help page for the formula: the simulation code for p-values in R-devel makes use of it and it is easy to compute via lgamma.

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Fernando Saldanha
I am trying to imitate encapsulation from other languages like Java or C++. Coming from that background, it bothers me that I can commit errors like the following: x - 1 f - function(z) { y - x; y + 1 } # Mistake: I should have written y - z f(10) [1] 2 In a language like Java the interpreter

Re: [R] R training courses

2006-02-02 Thread Jim Porzak
Internally, we did an R Programming Study Group using Thomas Lumley's excellent slides http://faculty.washington.edu/tlumley/Rcourse/ over 2 1/2 weeks. Individual success depended on individual motivation. The couple of folks that needed to come up to speed quickly did so. I broke Thomas's

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Duncan Murdoch
On 2/2/2006 5:05 PM, Fernando Saldanha wrote: I am trying to imitate encapsulation from other languages like Java or C++. Coming from that background, it bothers me that I can commit errors like the following: x - 1 f - function(z) { y - x; y + 1 } # Mistake: I should have written y - z

[R] Conflict between julian from base and from chron

2006-02-02 Thread colchero
I used to run the julian function from chron but this new version of R has also a julian function in the base package that doesn't do exactly what I need. Is there a way of telling R to run the function from chron and not from base? Thanks, Fernando __

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
R largely makes everything open (at least relative to languages that have strict encapsulation) and I think you simply need to accept that when using R. There are benefits to both approaches (the R approach generally involves less code which is particularly important when entering code into the

Re: [R] fisher table probability

2006-02-02 Thread array chip
Thanks for pointing. This is my simple function for doing this, just like to share if anyone ever needs it: ## x is a rxc table tabprob-function (x) { tmp-0 for (i in 1:dim(x)[1]) { tmp-tmp+lgamma(sum(x[i,])+1) for (j in 1:dim(x)[2]) { if (i==1) tmp-tmp+lgamma(sum(x[,j])+1)

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Ben Bolker
Michael wrote: shape3d only gives rigid sphere... not the free form ellipsoid that I want... one or the other of us is missing something. after running demo(shapes3d) [to define ellipsoid3d] and rgl.clear(), s1 - ellipsoid3d(qmesh = TRUE, trans = diag(4))

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Berton Gunter
Just echoing and slightly amplifying Gabor's comment... The semantics of R are really based on functional programming (LISP-like) rather than OOP (JAVA-like)? R's behavior is proper from that point of view; what is improper is Fernando's expectation that it should behave some other way. Of

Re: [R] Conflict between julian from base and from chron

2006-02-02 Thread Gabor Grothendieck
Perhaps you can provide an example of your problem. The session below is from R 2.2.1 on Windows XP. The base contains a generic and Date and POSIXt methods whereas chron currently contains a default method so in principle they can all coexist. methods(julian) [1] julian.Date

Re: [R] Conflict between julian from base and from chron

2006-02-02 Thread colchero
Thanks to all for the replies, actually I found that I had a problem downloading chron. It's running now. Fernando On Thu, 2 Feb 2006, Gabor Grothendieck wrote: Perhaps you can provide an example of your problem. The session below is from R 2.2.1 on Windows XP. The base contains a

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
I don't want to put words in anyone's mouth but I don't think the poster was voicing an unfair criticism so much as explaining his expectation coming from a java background. On 2/2/06, Berton Gunter [EMAIL PROTECTED] wrote: Just echoing and slightly amplifying Gabor's comment... The semantics

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Duncan Murdoch
On 2/2/2006 5:01 PM, Michael wrote: shape3d only gives rigid sphere... not the free form ellipsoid that I want... ? If you run the demo, you'll see ellipsoids... You just need to work out the appropriate transform to apply to a sphere to get the ellipsoid you want. I imagine something like

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Duncan Murdoch
On 2/2/2006 5:56 PM, Berton Gunter wrote: Just echoing and slightly amplifying Gabor's comment... The semantics of R are really based on functional programming (LISP-like) rather than OOP (JAVA-like)? R's behavior is proper from that point of view; what is improper is Fernando's expectation

[R] Canonical analysis

2006-02-02 Thread roberto munguia
Hi, I would like to know if someone has written a function to perform canonical analysis, sensu (Box and Wilson 1951, Box and Draper 1987). Searching the r-help list and the packages I have only found information about canonical correlation analysis and canonical variate analysis. Thanks a lot

[R] header intact

2006-02-02 Thread bui
--- Quang M Bui, Ph.D Department of Mathematics Statistics The University of Melbourne Victoria 3010 Australia Ph (W): +61 3 8344 8862 Fax: +61 3 8344 4599 E-mail: [EMAIL PROTECTED]

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
I think the issue in this case is the following aspect of UseMethod from ?UseMethod: 'UseMethod' and 'NextMethod' search for methods in two places: first in the environment in which the generic function is called, and then in the registration data base for the environment in

[R] Mixed-effects models / heterogenous covariances

2006-02-02 Thread David Duffy
Message: 24 Date: Tue, 31 Jan 2006 18:22:52 + From: Lutz Ph. Breitling [EMAIL PROTECTED] Subject: [R] Mixed-effects models / heterogeneous covariances To: r-help@stat.math.ethz.ch Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Dear R-list, maybe

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread John Fox
Dear Duncan, Michael, and Ben, The code to which I referred Michael works by deforming a sphere. Here's the central function: ellipsoid - function(center=c(0, 0, 0), radius=1, shape=diag(3), n=30){ # adapted from the shapes3d demo in the rgl package degvec - seq(0, 2*pi, length=n) ecoord2 -

[R] (newbie) Saving the workspace in .txt format

2006-02-02 Thread Thomas L Jones
(newbie question) How do I save the workspace in Windows text format (with the file extension .txt)? Also, having saved it and edited it, how do I load it back into the workspace? The setup is: Windows XP Home Edition Service Pack 2 R 2.2.0 English language Administrator privileges are enabled

Re: [R] fExtreme packages

2006-02-02 Thread Spencer Graves
Hello: The problem is not you. I just tried: library(fBasics) xmpfBasics() I run R under XEmacs, and this command caused my version of XEmacs to hang. After waiting 15 minutes, I was able to break out of it. However, I did not get the intended result. This is tragically

Re: [R] Glossay of available R functions

2006-02-02 Thread Patricia J. Hawkins
JB == Jonathan Baron [EMAIL PROTECTED] writes: JB In addition, the search page at JB http://finzi.psych.upenn.edu JB can search all functions of all CRAN packages. JB This is also available through JB RSiteSearch(string,restrict=functions). Thank you all! In fact, what I was looking for was

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
In thinking about this some more here is a slightly simpler solution than my previous one: library(zoo) z - ts(1:3) f - function(y) { index - local(function(x) index(x), .GlobalEnv) index(y) } environment(f) - baseenv() f(z) On 2/2/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: I think

Re: [R] Glossay of available R functions

2006-02-02 Thread Prof Brian Ripley
On Thu, 2 Feb 2006, Patricia J. Hawkins wrote: JB == Jonathan Baron [EMAIL PROTECTED] writes: JB In addition, the search page at JB http://finzi.psych.upenn.edu JB can search all functions of all CRAN packages. JB This is also available through JB RSiteSearch(string,restrict=functions).

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Gabor Grothendieck
And one further simplification: library(zoo) z - ts(1:3) f - local(function(y) { index - local(function(x) index(x), .GlobalEnv) index(y) }, baseenv()) f(z) On 2/2/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: In thinking about this some more here is a slightly simpler solution than my

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Prof Brian Ripley
On Thu, 2 Feb 2006, Fernando Saldanha wrote: I am trying to imitate encapsulation from other languages like Java or C++. Coming from that background, it bothers me that I can commit errors like the following: x - 1 f - function(z) { y - x; y + 1 } # Mistake: I should have written y - z

[R] ERROR: compilation failed for package 'RdbiPgSQL'

2006-02-02 Thread Srinivas Iyyer
Dear Group, I have been trying to connect postgres with R. I followed the instructions from : http://grass.itc.it/statsgrass/r_and_dbms.html. However, RdbiPgSQL fails to install and throws up error. Could any one please help me where the things are going wrong. I have attached the log, and

Re: [R] (newbie) Saving the workspace in .txt format

2006-02-02 Thread Prof Brian Ripley
On Thu, 2 Feb 2006, Thomas L Jones wrote: (newbie question) How do I save the workspace in Windows text format (with the file extension .txt)? Also, having saved it and edited it, how do I load it back into the workspace? `save' is a command in R, and it has a ascii argument. So you could do