Re: [R] R 2.0.0 is released

2004-10-06 Thread Petr Pikal
On 5 Oct 2004 at 8:15, Marc Schwartz wrote: On Tue, 2004-10-05 at 05:43, Peter Dalgaard wrote: Barry Rowlingson [EMAIL PROTECTED] writes: Gabor Grothendieck wrote: Congratulations to the R team and all involved for reaching the 2.0.0 milestone. The progress of R is truly

Re: [R] Problems with merge

2004-10-06 Thread TEMPL Matthias
Hello, You can change e.g. the second column name in the following way: data(iris) colnames(iris) [1] Sepal.Length Sepal.Width Petal.Length Petal.Width Species To change the second column name: colnames(iris)[2] - name colnames(iris) [1] Sepal.Length name Petal.Length Petal.Width

Re: [R] Confounded data frame column names

2004-10-06 Thread Uwe Ligges
Booker, Andrew J wrote: This is probably a know problem (problem for me anyway) in R but I don't quite know what to search for in help archives. When I name a column x11 in a data frame R thinks a column named x1 exists. Not exactly. R uses partial matching here. Iff x11 and x1 exists, x11 will

[R] crossprod vs %*% timing

2004-10-06 Thread Robin Hankin
Hi the manpage says that crossprod(x,y) is formally equivalent to, but faster than, the call 't(x) %*% y'. I have a vector 'a' and a matrix 'A', and need to evaluate 't(a) %*% A %*% a' many many times, and performance is becoming crucial. With f1 - function(a,X){ ignore - t(a) %*% X %*% a

Re: [R] crossprod vs %*% timing

2004-10-06 Thread Dimitris Rizopoulos
Hi Robin, I some cases you could benefit from special features of the matrices at hand (I don't know if this is applicable in your case). For instance, in Bayesian computations I often face the quadratic form t(y)%*%solve(Sigma)%*%y, where Sigma is a covariance matrix. In this case you could

Re: [R] Problems with merge

2004-10-06 Thread Karl Knoblick
Hello! merge(TablePatient, TableSpecial, by.x=ID, by.y=PATIENTID) works fine for me. (There is also a variable ID in TableSpecial). One problem - or what has to be known - is that merge is using the levels, not the labels, if the merged variables are factors. Karl

Re: [R] crossprod vs %*% timing

2004-10-06 Thread Peter Wolf
You can study that the order of the operation has an effect on the times of the computations. *= f1 - function(a,X){ ignore - t(a) %*% X %*% a } f2 - function(a,X){ ignore - crossprod(t(crossprod(a,X)),a) } f3 - function(a,X){ ignore - crossprod(a,X) %*% a } f4 -

[R] RExcel : problem with error handler?

2004-10-06 Thread Matthew Dowle
Dear R-help, Call RInterface.StartRServer ' Works fine Call RInterface.RRun(objects()) ' Works fine Call Rinterface.RRun( other R commands which do not generate errors, the demos etc ) ' Works fine But ... Call RInterface.RRun(doesnotexist)' Sends Excel into endless

[R] R-1.9.1 on OS 10.2

2004-10-06 Thread K . M . Csillery
Hi, I've been using R 1.7.1 but now I need to upgrade to R-1.9.1. Since it is not on the Fink tree yet I tried to install it from source to my sw library. The configuration runs fine, but make doesn't. Here is the error message I get: /sw/lib/libg2c.a(err.o) definition of common f(short, void,

Re: [R] RExcel : problem with error handler?

2004-10-06 Thread Prof Brian Ripley
Please note, this is R-help. The mailing list for help with RExcel (which is not part of R) is given on http://cran.r-project.org/contrib/extra/dcom/RSrv135.html as http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l On Wed, 6 Oct 2004, Matthew Dowle wrote: Dear R-help, Call

Re: [R] R-1.9.1 on OS 10.2

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004 [EMAIL PROTECTED] wrote: I've been using R 1.7.1 but now I need to upgrade to R-1.9.1. Since it is not on the Fink tree yet What is `it'? The current version of R is 2.0.0, BTW. I tried to install it from source to my sw library. The configuration runs fine, but make

[R] Foreign code problem

2004-10-06 Thread Rolf Wester
Hello, I wanted to test the odesolve package and tried to use compiled C-code. But when I do: erg - lsoda(y, times, mond, parms, rtol, atol, tcrit=NULL, jacfunc=NULL, verbose=FALSE, dllname=mond, hmin=0, hmax=Inf) I get the error message: Error in lsoda(y, times, mond, parms, rtol,

Re: [R] Foreign code problem

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004, Rolf Wester wrote: Hello, I wanted to test the odesolve package and tried to use compiled C-code. But when I do: erg - lsoda(y, times, mond, parms, rtol, atol, tcrit=NULL, jacfunc=NULL, verbose=FALSE, dllname=mond, hmin=0, hmax=Inf) I get the error

Re: [R] R 2.0.0 is released

2004-10-06 Thread rongguiwong
congratulations! i download the software and install it. it is pretty good.it start much more quickly than 1.9.1. but i find a problem. i have a data frame,the variblePROVICE' is in Chinese,but it appears like this: [1] \261\261\276\251 \314\354\275\362 [3] \272\323\261\261

[R] lattice package for R 2.0.0

2004-10-06 Thread stefan . albrecht
Dear all, I am trying to install packages with the new R 2.0.0. However for several packages, like MASS, lattice or R2HTML, I get an error like: library(lattice) Error in library(lattice) : 'lattice' is not a valid package -- installed 2.0.0? However, I have just downloaded the latest

[R] Repeated measures

2004-10-06 Thread Sean Davis
I have a data set in which I have 5000 repeated measures on 6 subjects over time (varying intervals, but measurements for all individuals are at the same times). There are two states, a resting state (the majority of the time), and a perturbed state. I have a continuous measurement at each

Re: [R] R 2.0.0 is released

2004-10-06 Thread Prof Brian Ripley
R does not claim, in 1.9.1 or 2.0.0, to support Chinese characters, so this is certainly not a bug. PLEASE read the posting guide and FAQ about the definition of a `bug', as well as the need to give useful information such as your platform, locale settings (for language-related questions)

Re: [R] lattice package for R 2.0.0

2004-10-06 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Dear all, I am trying to install packages with the new R 2.0.0. However for several packages, like MASS, lattice or R2HTML, I get an error like: library(lattice) Error in library(lattice) : 'lattice' is not a valid package -- installed 2.0.0? Eh? lattice and MASS (the

[R] R 2.0.0 (Windows): slow startup over the network

2004-10-06 Thread Thomas Petzoldt
Hello, I installed R 2.0.0/Windows on our network server (Win NT 4.0) with all CRAN packages and observed a quick startup on this machine (3s). However, when startet from different client machines (e.g. Win NT 4.0 or Win XP Pro SP2, Athlon XP 1700, 100 Mbit Network) the R Gui Window appears

Re: [R] lattice package for R 2.0.0

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004 [EMAIL PROTECTED] wrote: I am trying to install packages with the new R 2.0.0. However for On Windows, not mentioned! Probably a pre-compiled binary, not mentioned. several packages, like MASS, lattice or R2HTML, I get an error like: library(lattice) Error in

Re: [R] lattice package for R 2.0.0

2004-10-06 Thread Duncan Murdoch
On Wed, 6 Oct 2004 13:59:32 +0200, [EMAIL PROTECTED] wrote : Dear all, I am trying to install packages with the new R 2.0.0. However for several packages, like MASS, lattice or R2HTML, I get an error like: library(lattice) Error in library(lattice) : 'lattice' is not a valid package --

Re: [R] lattice package for R 2.0.0

2004-10-06 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: Dear all, I am trying to install packages with the new R 2.0.0. However for several packages, like MASS, lattice or R2HTML, I get an error like: library(lattice) Error in library(lattice) : 'lattice' is not a valid package -- installed 2.0.0? However, I

Re: [R] R 2.0.0 (Windows): slow startup over the network

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004, Thomas Petzoldt wrote: I installed R 2.0.0/Windows on our network server (Win NT 4.0) with all CRAN packages and observed a quick startup on this machine (3s). That's actually very slow: decent machine are well under 1s. However, when startet from different client

[R] lattice package for R 2.0.0

2004-10-06 Thread stefan . albrecht
Dear all, thanks a lot for your help. Indeed, I have overloaded the MASS and lattice packages already shipped with R. However, I have followed the web-site at http://cran.at.r-project.org/ and, as it seems, have been directed to an old version of the packages. After a complete

Re: [R] lattice package for R 2.0.0

2004-10-06 Thread Duncan Murdoch
On Wed, 6 Oct 2004 14:38:09 +0200, [EMAIL PROTECTED] wrote : Dear all, thanks a lot for your help. Indeed, I have overloaded the MASS and lattice packages already shipped with R. However, I have followed the web-site at http://cran.at.r-project.org/ and, as it seems, have been directed to

[R] read.delim problem with trailing spaces

2004-10-06 Thread Michael Friendly
I'm trying to read a comma delimited dataset that uses '.' for NA. I found that if the last field on a line was a missing '.' it was not read as NA, but just a '.', and the life variable was made a factor. The data looks like this, income,imr,region,oilexprt,imr80,gnp80,life

Re: [R] R 2.0.0 (Windows): slow startup over the network

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004, Thomas Petzoldt wrote: Prof Brian Ripley wrote: On Wed, 6 Oct 2004, Thomas Petzoldt wrote: I installed R 2.0.0/Windows on our network server (Win NT 4.0) with all CRAN packages and observed a quick startup on this machine (3s). That's actually very

Re: [R] read.delim problem with trailing spaces

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004, Michael Friendly wrote: I'm trying to read a comma delimited dataset that uses '.' for NA. I found that if the last field on a line was a missing '.' it was not read as NA, but just a '.', and the life variable was made a factor. The data looks like this,

Re: [R] R 2.0.0 (Windows): slow startup over the network

2004-10-06 Thread Uwe Ligges
Prof Brian Ripley wrote: On Wed, 6 Oct 2004, Thomas Petzoldt wrote: I installed R 2.0.0/Windows on our network server (Win NT 4.0) with all CRAN packages and observed a quick startup on this machine (3s). That's actually very slow: decent machine are well under 1s. However, when startet from

RE: [R] read.delim problem with trailing spaces

2004-10-06 Thread John Fox
Dear Mike, This is a trap, but it's not a bug, and to correct it wouldn't be appropriate, I think. That is, the string . wasn't declared as NA. One could do the following to avoid the problem: read.csv(c:/temp/test.txt, na.strings=., strip.white=TRUE) income imr region oilexprt

Re: [R] R 2.0.0 (Windows): slow startup over the network

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004, Duncan Murdoch wrote: On Wed, 06 Oct 2004 15:50:34 +0200, Uwe Ligges [EMAIL PROTECTED] wrote : R-2.0.0 with the complete CRAN collection, Bioconductor and some other stuff installed on a capable Windows 2003 Server using a client with WinNT4.0: The RGui window

Re: [R] Problems with merge

2004-10-06 Thread Thomas Lumley
On Wed, 6 Oct 2004, Vikas Rawal wrote: The problem is that R allows you to use by.x and by.y variables to specify only one variable in x dataset and one variable in y dataset to merge. This turns out not to be the case. names(df) [1] x y z names(df2) [1] a b c

[R] 2x2 test: total confusion.

2004-10-06 Thread Dan Bolser
I wan't a test for the 'association' between two events, lets say the color of balls picked and the pickers (this is quite a good analogy to my data). I have 200 different pickers P I have 1,000 colors of balls C I have 1,000,000 picks in total I am totally confused about what

[R] dlogis for large negative numbers

2004-10-06 Thread Dimitris Rizopoulos
Hi to all, dlogis(-2000) [1] NaN Warning message: NaNs produced in: dlogis(x, location, scale, log) dnorm(-2000) [1] 0 Is this an expected behaviour of `dlogis()'? Thanks in advance for any comments, Dimitris platform i386-pc-mingw32 arch i386 os mingw32 system

[R] plotOHLC unequally spaced time.

2004-10-06 Thread Per Wiklund
Hi I have som financial tick data that i have converted in to 45 min bars. These are unequally spaced in time. I wonder if it is possible to plot these like bars as the plotOHLC does. As I have understood plotOHLC uses class(mts) that must be equally spaced? Regards Paer [[alternative

Re: [R] dlogis for large negative numbers

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004, Dimitris Rizopoulos wrote: Hi to all, dlogis(-2000) [1] NaN Warning message: NaNs produced in: dlogis(x, location, scale, log) dnorm(-2000) [1] 0 Is this an expected behaviour of `dlogis()'? No, it's a poor algorithm. See dlogis.c x = (x - location) /

[R] quadratically constrained quadratic programming

2004-10-06 Thread Jianhui Zhou
Hi, Does anybody have experience to solve an quadratic programming problem with quadratic constraints in R? It seems that the package quadprog only handles the quadratic programming with linear constraint. My probelm is to maximze x^T\Sigma_{xy} y, subject to x^Tx=1, y^T\Sigma_{yy} y=1, and

[R] lapply with argument X

2004-10-06 Thread john.gavin
Hi, I am probably making a simple mistake but I can't see it X Error: Object X not found exists(X) [1] FALSE lapply(X, exists) [[1]] [1] TRUE Why is lapply producing true? Is it something to do with the first argument of lapply also being called 'X'? version _

[R] Checking if an element is part of a vector

2004-10-06 Thread Dominik Bach
Hi! I want to know if a given element - ('c64') is part of a vector- ('c64', 'amiga', 'atari'). Does a function exist for this which gives back a logical value? thankx db __ [EMAIL PROTECTED] mailing list

Re: [R] lapply with argument X

2004-10-06 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: Hi, I am probably making a simple mistake but I can't see it X Error: Object X not found exists(X) [1] FALSE lapply(X, exists) [[1]] [1] TRUE Why is lapply producing true? Is it something to do with the first argument of lapply also being called 'X'?

Re: [R] lapply with argument X

2004-10-06 Thread Prof Brian Ripley
On Wed, 6 Oct 2004 [EMAIL PROTECTED] wrote: Hi, I am probably making a simple mistake but I can't see it X Error: Object X not found exists(X) [1] FALSE lapply(X, exists) [[1]] [1] TRUE Why is lapply producing true? Is it something to do with the first argument of lapply also

Re: [R] Checking if an element is part of a vector

2004-10-06 Thread Prof Brian Ripley
?%in% ?is.element On Wed, 6 Oct 2004, Dominik Bach wrote: I want to know if a given element - ('c64') is part of a vector- ('c64', 'amiga', 'atari'). Does a function exist for this which gives back a logical value? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of

Re: [R] Checking if an element is part of a vector

2004-10-06 Thread Peter Dalgaard
Dominik Bach [EMAIL PROTECTED] writes: Hi! I want to know if a given element - ('c64') is part of a vector- ('c64', 'amiga', 'atari'). Does a function exist for this which gives back a logical value? 'c64' %in% c('c64', 'amiga', 'atari') [1] TRUE -- O__ Peter Dalgaard

Re: [R] Checking if an element is part of a vector

2004-10-06 Thread Marc Schwartz
On Wed, 2004-10-06 at 11:23, Dominik Bach wrote: Hi! I want to know if a given element - ('c64') is part of a vector- ('c64', 'amiga', 'atari'). Does a function exist for this which gives back a logical value? thankx db v - c(c64, amiga, atari, MITS Altair, pong) c64 %in% v [1]

Re: [R] Checking if an element is part of a vector

2004-10-06 Thread Roger D. Peng
Try element %in% vector or look at match() -roger Dominik Bach wrote: Hi! I want to know if a given element - ('c64') is part of a vector- ('c64', 'amiga', 'atari'). Does a function exist for this which gives back a logical value? thankx db __ [EMAIL

Summary, was [R] Plotting panels at arbitrary places on a map, rather than on a lattice

2004-10-06 Thread Michael Dewey
At 17:58 01/10/04, Michael Dewey wrote: I think it is easiest to describe what I want in terms of the concrete problem I have. I have data from a number of countries in each of which a sample of people was interviewed. In presenting the results in a forthcoming collaborative publication much

Re: [R] lapply with argument X

2004-10-06 Thread Barry Rowlingson
Peter Dalgaard wrote: Internal variable capture. I think this is a bug. Also, try lapply(FUN,get) If 'exists' was vectorised in its first argument then there wouldn't be a need to use lapply with it, would there? I'm guessing the original problem stems from something like: got =

[R] Performing Analysis on Subset of External data

2004-10-06 Thread Laura Quinn
Hi, I want to perform some analysis on subsets of huge data files. There are 20 of the files and I want to select the same subsets of each one (each subset is a chunk of 1500 or so consecutive rows from several million). To save time and processing power is there a method to tell R to *only* read

Re: [R] plotOHLC unequally spaced time.

2004-10-06 Thread Gabor Grothendieck
Per Wiklund par at wiklund.net writes: : Hi I have som financial tick data that i have converted in to 45 min : bars. These are unequally spaced in time. I wonder if it is possible to : plot these like bars as the plotOHLC does. As I have understood plotOHLC : uses class(mts) that must be

RE: [R] lapply with argument X

2004-10-06 Thread Thomas Lumley
On Wed, 6 Oct 2004 [EMAIL PROTECTED] wrote: Fyi, I wanted to show that users have to use single character variables with caution because of the existance of objects like 'c', 'q', 'T' and 'F'. So I tried to say xx - c(letters, LETTERS) ; xx[sapply(xx, exists)] [1] c q t C D F I Q T X but the

Re: [R] Performing Analysis on Subset of External data

2004-10-06 Thread Gavin Simpson
Laura Quinn wrote: Hi, I want to perform some analysis on subsets of huge data files. There are 20 of the files and I want to select the same subsets of each one (each subset is a chunk of 1500 or so consecutive rows from several million). To save time and processing power is there a method to

[R] R Newsletter

2004-10-06 Thread Thomas Lumley
Issue 4/2 of the R Newsletter is up on www.r-project.org. This issue is especially commended to your attention since it has an article by Brian Ripley describing the largest change in R 2.0.0, lazy loading of packages. -thomas Thomas Lumley Assoc. Professor,

Re: [R] Performing Analysis on Subset of External data

2004-10-06 Thread Thomas Lumley
On Wed, 6 Oct 2004, Laura Quinn wrote: Hi, I want to perform some analysis on subsets of huge data files. There are 20 of the files and I want to select the same subsets of each one (each subset is a chunk of 1500 or so consecutive rows from several million). To save time and processing power is

Re: [R] Performing Analysis on Subset of External data

2004-10-06 Thread Prof Brian Ripley
1) Use the skip= and nrows= arguments to read.table. 2) Open a connection, read and discard rows, read the block you want then close the connection. (Which is how 1 works, essentially.) 3) Use perl, awk or some such to extract the rows you want -- this is probably rather faster. On Wed, 6 Oct

[R] setClass - equvalent declarations?

2004-10-06 Thread Witold Eryk Wolski
Hi, Why the third declation is not equivalent to the first 2 and gives a Warning #1 setClass(MVE,representation(list,names=character)) #2 setClass( MVE ,contains=list ,representation( names=character ) ) #3

[R] Dataframe manipulation question

2004-10-06 Thread Greg Blevins
Hello, I have a data frame that has three fields. Resp# ActCode ProdUsed 100 3 2 100 3 2 100 4 3 100 4 3 101 3 6 102 2 1 102

Re: [R] Dataframe manipulation question

2004-10-06 Thread Sundar Dorai-Raj
Greg Blevins wrote: Hello, I have a data frame that has three fields. Resp# ActCode ProdUsed 100 3 2 100 3 2 100 4 3 100 4 3 101 3 6 102 2

[R] Dataframe Manipulation Question

2004-10-06 Thread Greg Blevins
Thanks to all that responded to my problem. I am always amazed by how helpful the R community is! Greg Blevins [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Dataframe manipulation question

2004-10-06 Thread Rajarshi Guha
On Wed, 2004-10-06 at 16:26, Greg Blevins wrote: Hello, I have a data frame that has three fields. Resp# ActCode ProdUsed 100 3 2 100 3 2 100 4 3 100 4 3 101 3

Re: [R] Dataframe manipulation question

2004-10-06 Thread John Fox
Dear Greg, How about this? n - nrow(Data) index - 1:n sel - c(TRUE, !apply(Data[index[-1], c(1,2)] == + Data[index[-n], c(1,2)], 1, all)) Data[sel,] Resp ActCode ProdUsed 1 100 32 3 100 43 5 101 36 6 102 21 7 102

RE: [R] Repeated measures

2004-10-06 Thread F Z
5,000 repeated measures! You might have problems fitting a old school univariate or multivariate ANOVA RM model. Can you group some of the measurements or you actually want to make inferences at each time point? Anyway, try using a newer method, like lme from the library lme4. The book by

[R] as.complex

2004-10-06 Thread Erich Neuwirth
as.complex(2+1i) - 2+1i as.complex(2+i) - NA Does somebody have a modified version of as.complex which does the coercion in a less strict manner and produces a complex number also for strings like the second example? Perhaps it would even make sense to change the behavior of as.complex to handle

[R] R-(wiki)-pedia?

2004-10-06 Thread Dan Bolser
Is there an R wiki? Looking at the huge amount of traffic on this list, I think wiki could be an exelet outlet for all the constructive enthusiasm here. I don't think it would be too hard to port the existing R documentation (the stuff you get with the ?) onto a wiki system, then users could

Re: [R] R-(wiki)-pedia?

2004-10-06 Thread Gabor Grothendieck
Dan Bolser dmb at mrc-dunn.cam.ac.uk writes: : : Is there an R wiki? : : Looking at the huge amount of traffic on this list, I think wiki could be : an exelet outlet for all the constructive enthusiasm here. : : I don't think it would be too hard to port the existing R documentation : (the

RE: [R] Dataframe Manipulation Question

2004-10-06 Thread Ted Harding
On 06-Oct-04 Greg Blevins wrote: Thanks to all that responded to my problem. I am always amazed by how helpful the R community is! Because the R community, via the R list, like any good mailing list community, is like a global coffee-room where anyone can start talking about what concerns them

[R] Mac: importing saved PDF figures into Illustrator CS

2004-10-06 Thread René J.V. Bertin
Hello, This is a usage question for others with experience of R under the Aqua Mac OS X interface. Basically, I don't succeed in importing PDF files (created with the 'Save As' menu to Quartz device windows) into Illustrator. Versions up to (and including?) 10 loose paths (lines/polygons) and

[R] update.packages() with R 2.0.0

2004-10-06 Thread Joseph J. Gazaille
Good day to all of you and thank you for reading this. I certainly must have done something awfully wrong when I downloaded and installed R 2.0.0 on a PC with Windows 98. You will find below what happens when I try to 'update.packages()'. I know what the first 'warning message' means. About

[R] control enviromnet

2004-10-06 Thread facS93
Hi all: I would like to implement an option in my function so that it warns me of any variables that are not defined in the current environment - if it needs to look up variables in the parent frame, it tells me so. The following is an example and it does what I want, and I'd rather have the

Re: [R] control enviromnet

2004-10-06 Thread Roger D. Peng
I think you want something like exists(x, where = environment(), inherits = FALSE) -roger [EMAIL PROTECTED] wrote: Hi all: I would like to implement an option in my function so that it warns me of any variables that are not defined in the current environment - if it needs to look up variables in

Re: [R] control enviromnet

2004-10-06 Thread Gabor Grothendieck
facS93 at hampshire.edu writes: : : Hi all: : : I would like to implement an option in my function so that it warns me of any : variables that are not defined in the current environment - if it needs to : look up variables in the parent frame, it tells me so. : : The following is an

Re: [R] update.packages() with R 2.0.0

2004-10-06 Thread Duncan Murdoch
On Mon, 04 Oct 2004 21:27:47 -0400, Joseph J. Gazaille [EMAIL PROTECTED] wrote: Good day to all of you and thank you for reading this. I certainly must have done something awfully wrong when I downloaded and installed R 2.0.0 on a PC with Windows 98. You will find below what happens when I try

Re: [R] Making a 'joint distribution'?

2004-10-06 Thread Ajay Shah
Thanks to everyone who helped me solve this question. My cleanest solution is: joint.and.marginals - function(x,y) { t - addmargins(table(x, y)) rownames(t)[nrow(t)] - deparse(substitute(y)) colnames(t)[ncol(t)] - deparse(substitute(x)) return(t) } There are many other valid solutions,

Re: [R] Making a 'joint distribution'?

2004-10-06 Thread Gabor Grothendieck
Ajay Shah ajayshah at mayin.org writes: : : Thanks to everyone who helped me solve this question. My cleanest : solution is: : : joint.and.marginals - function(x,y) { : t - addmargins(table(x, y)) : rownames(t)[nrow(t)] - deparse(substitute(y)) : colnames(t)[ncol(t)] -

Re: [R] Making a 'joint distribution'?

2004-10-06 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes: : : Ajay Shah ajayshah at mayin.org writes: : : : : : Thanks to everyone who helped me solve this question. My cleanest : : solution is: : : : : joint.and.marginals - function(x,y) { : : t - addmargins(table(x, y)) : :