[R] How to sort data points in high dimension space

2006-12-14 Thread S.Q. WEN
Dear all, There are n points in R^p, I want to sort th data like this, first sort the data by the first coordinate, and then partition the data in to several subsets, then in every subset, sort the data by the second coordinate, then partiotion.. In general, I want to partition the high

Re: [R] digital length

2006-12-14 Thread Michael Kubovy
?Round On Dec 14, 2006, at 2:52 AM, XinMeng wrote: How can I control the digital length of data? e.g: 0.1234 is the output of an algorithm. What I want is 0.12 instead. _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box

Re: [R] install.packages

2006-12-14 Thread Uwe Ligges
Aimin Yan wrote: I try to type this in my R-winEdt. GH! Again and again I have to tell that RWinEdt is just some enhancement for an editor that may help for you R programming, but is not related to any error messages you receive from R! but I got these. Do you know? Yes, you

Re: [R] xyplot: discrete points + continuous curve per panel

2006-12-14 Thread Petr Pikal
Hi there is probably better solution but you can try to fiidle with this idea, which adds stight lines to each panel one after another. # based on Gabor Grothendieck's code suggestion # adds straight lines to panels in lattice plots addLine- function(...) { tcL - trellis.currentLayout() for(i

Re: [R] Welcome to the R-help mailing list

2006-12-14 Thread Bird Fish
Dear Colleagues I am a very new member here. If my question sounds silly to you, I apologize in advance. If I have a complicated function without an explicit expression. ( For example, the price of American put option p is a function of the current stock price S and expected future volatility

Re: [R] Welcome to the R-help mailing list

2006-12-14 Thread Robin Hankin
Hi you could use interpolant() of the emulator package, for a Gaussian process approach, or approx() [or appproxfun()] if linear interpolation is acceptable. HTH Robin On 14 Dec 2006, at 10:20, Bird Fish wrote: Dear Colleagues I am a very new member here. If my question sounds silly to

[R] two connected graphs

2006-12-14 Thread Robin Hankin
Hi I have two datasets, A and B, consisting of two columns of numbers representing x and y coordinates. They have 10 and 6 rows respectively. I want to plot two scattergraphs, one above the other. The lower graph to contain A (10 points) and the upper graph to contain B (six points). The

[R] Contents of R-packages

2006-12-14 Thread Ralf Finne
Hi experts, How do I see the contents of a package that looks interesting? Efter I have loded the package, is there an command that gives me the contents or even better a summary or introduction. Ralf Finne SYH University of Applied Sciences, Finland

[R] Fit Frechet Distribution

2006-12-14 Thread Benjamin Dickgiesser
Hi everyone, is there a function to fit a frechet distribution? The only thing I found is gev.fit from ismev which fits a generalized extreme value distribution (if shape1 = Frechet) . Is there a function to only fit a frechet? Thank you Benjamin __

Re: [R] Contents of R-packages

2006-12-14 Thread Chuck Cleland
Ralf Finne wrote: Hi experts, How do I see the contents of a package that looks interesting? Efter I have loded the package, is there an command that gives me the contents or even better a summary or introduction. library(yags) # Load the package search() # Where is the package? [1]

Re: [R] Sweave, Xfig, pdflatex and \setkeys

2006-12-14 Thread Friedrich Leisch
On Wed, 13 Dec 2006 12:38:04 +0100, David Lindelöf (DL) wrote: On Tue, 2006-12-12 at 13:22 -0500, Kevin E. Thorpe wrote: Trouble is that Sweave defines (with \setkeys) the default width of \includegraphics to be 0.8 times the \textwidth. The result is that the graphic is scaled,

[R] Function to fit a STARIMA model

2006-12-14 Thread Rajesh Krishnan
Hi all, I was wondering if there is a function available in any of the R add-on packages that could be used to fit a STARIMA (Phillip E. Pfeifer and Stuart Jay Deutsch. (1980). A STARIMA Model-Building Procedure with Application to Description and Regional Forecasting, Transactions of the

Re: [R] R_Code

2006-12-14 Thread Hans-Peter
2006/12/13, Duncan Murdoch [EMAIL PROTECTED]: [snipped] Good description. Thank you!! -- Regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] lmacfPlot in fBasics

2006-12-14 Thread Amir Safari
Dear R users, Once working with fBasics, in particular lmacfPlot, for producing long memory autocorrelation plot, a log-log plot is generated when there is long memory in data, otherwise an ACF plot is generated which shows no autocorrelation. A problem occures when we want

[R] How do I create an object in the Global environment from a function

2006-12-14 Thread Timothy . Mak
Hi all, Say I have created an object b in my function myfunc - function() b - 34 How can I make b an object in the Global environment and not just in the environment of myfunc? Thanks, Tim __ R-help@stat.math.ethz.ch mailing list

Re: [R] How do I create an object in the Global environment from a function

2006-12-14 Thread Rainer M Krug
[EMAIL PROTECTED] wrote: Hi all, Say I have created an object b in my function myfunc - function() b - 34 myfunc - function() b - 34 - Rainer How can I make b an object in the Global environment and not just in the environment of myfunc? Thanks,

[R] question about for loop

2006-12-14 Thread Jenny persson
Dear R-experts, I have a dataset of 4 patients and each patient has many records at four different time points. I have done 4 different qqnorm plots on the same graph where each plot represents the records of one patient at each time point. I would like to do the same graph for the

[R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in a table format with all the data in one long column #running

Re: [R] Contents of R-packages

2006-12-14 Thread Chuck Cleland
Ralf Finne wrote: Hi experts, How do I see the contents of a package that looks interesting? Efter I have loded the package, is there an command that gives me the contents or even better a summary or introduction. The following, which was mentioned to me off the list, also provides

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Rainer M Krug
Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in a table format with all the data

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Duncan Murdoch
On 12/14/2006 7:56 AM, Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in a table

[R] Delete all dimnames

2006-12-14 Thread Serguei Kaniovski
Hello, how can I get rid of all dimnames so that: $amat Var3 Var2 Var1 8 1111 1 1 1 1 0 0 0 0 0 0 0 7 1110 1 0 0 0 1 0 0 0 0 0 0 6 1101 0 1 0 0 0 1 0 0 0 0 0 5 1100 0 0 0 0 0 0 1 0 0 0 0 4 1011 0 0 1 0 0 0 0 1 0 0 0 3 101

Re: [R] question about for loop

2006-12-14 Thread Petr Pikal
Hi well, we do not know how is your data organised so it is only a guess. On 14 Dec 2006 at 13:54, Jenny persson wrote: Date sent: Thu, 14 Dec 2006 13:54:27 +0100 (CET) From: Jenny persson [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear R-help, I forgot to mention that I need the array in that format because I am going to do the same thing for another dataset of precipitation (ncep.data2) so they are both arrays of dimensions [144,72,46] so that I can correlate them globally and plot a visual image of the global

[R] sapply problem

2006-12-14 Thread Joerg van den Hoff
I have encountered the following problem: I need to extract from a list of lists equally named compenents who happen to be 'one row' data frames. a trivial example would be: a - list(list( df = data.frame(A = 1, B = 2, C = 3)), list(df = data.frame(A = 4,B = 5,C = 6))) I want the extracted

Re: [R] How do I create an object in the Global environment from a function

2006-12-14 Thread Charilaos Skiadas
On Dec 14, 2006, at 7:42 AM, Rainer M Krug wrote: myfunc - function() b - 34 I would add a warning here. It is generally not a good idea for a function to have side-effects. In this case, if there is a globally defined value for b already, it will be overwritten. If this function is in a

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread David Barron
What about gpcc.array - array(gpcc.data2[,5], dim=c(144,72,46)) On 14/12/06, Rainer M Krug [EMAIL PROTECTED] wrote: Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Marc Schwartz
On Thu, 2006-12-14 at 12:56 +, Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in

[R] Model formula question

2006-12-14 Thread Ronaldo Prati
Hi all, I'm not familiar with R programming and I'm trying to reproduce a result from a paper. Basically, I have a dataset which I would like to model in terms of successive increments, i.e. (y denote empirical values of y) y_1 = y1, y_2 = y1 + delta1, y_3 = y1 + delta1 + delta2. ... y_m =

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Rainer M Krug
David Barron wrote: What about gpcc.array - array(gpcc.data2[,5], dim=c(144,72,46)) I guess this will be slightly faster then my suggestion :-) ? On 14/12/06, Rainer M Krug [EMAIL PROTECTED] wrote: Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear R-help, Thank you for the responses off everyone- you'll be please to hear Duncan that using: gpcc.array - array(gpcc.data2[,5], c(144, 72, 46)) was spot-on, worked like a dream. The data is in the correct places as I checked with the text file. It took literally 2 seconds - quite an

Re: [R] Delete all dimnames

2006-12-14 Thread Petr Pikal
Hi try to read ?matrix help page. It leads you to dimnames and dimmnames($amat)-NULL strips dimnames from matrix. HTH Petr On 14 Dec 2006 at 14:29, Serguei Kaniovski wrote: To: r-help@stat.math.ethz.ch From: Serguei Kaniovski [EMAIL PROTECTED] Date

[R] Model formula question

2006-12-14 Thread Ronaldo Prati
Hi all, I'm not familiar with R programming and I'm trying to reproduce a result from a paper. Basically, I have a dataset which I would like to model in terms of successive increments, i.e. (y denote empirical values of y) y_1 = y1, y_2 = y1 + delta1, y_3 = y1 + delta1 + delta2. ... y_m =

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Barry Rowlingson
Jenny Barnes wrote: Dear R-help, Thank you for the responses off everyone- you'll be please to hear Duncan that using: gpcc.array - array(gpcc.data2[,5], c(144, 72, 46)) was spot-on, worked like a dream. The data is in the correct places as I checked with the text file. It took

Re: [R] Install R in Linux

2006-12-14 Thread John Kane
--- Peter Dalgaard [EMAIL PROTECTED] wrote: lu kan wrote: Hi, Is it possible to install R in a linux box (Debian) without being a root. I know I can compile the R source code, but there is no F77 compiler on the box. So is it possible to install binary R without being a root? (We

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear Patrick, Thank you for the link - I'd advise anyone who's started using R to have a look at these as well - any help is always appreciated. I've downloaded the S Poetry and will hit the books tomorrow and get reading it! Jenny S Poetry may be of use to you -- especially the chapter on

[R] matrix - change values

2006-12-14 Thread robert-mcfadden
Dear R Users, I have a matrix A, and I want to change every value of this matrix if these values are greater than an assuming value. For a vector it is simple, e.g. a-c(1:10); a[a5]-0. Of course, I can change matrix to vector, assign a value then change vector to matrix. But does there exist

Re: [R] Delete all dimnames

2006-12-14 Thread Joerg van den Hoff
Serguei Kaniovski wrote: Hello, how can I get rid of all dimnames so that: $amat Var3 Var2 Var1 8 1111 1 1 1 1 0 0 0 0 0 0 0 7 1110 1 0 0 0 1 0 0 0 0 0 0 6 1101 0 1 0 0 0 1 0 0 0 0 0 5 1100 0 0 0 0 0 0 1 0 0 0 0 4 1011 0 0 1

Re: [R] Install R in Linux

2006-12-14 Thread BBands
On 12/13/06, lu kan [EMAIL PROTECTED] wrote: Hi, Is it possible to install R in a linux box (Debian) without being a root. I know I can compile the R source code, but there is no F77 compiler on the box. So is it possible to install binary R without being a root? If you can get the F77

Re: [R] matrix - change values

2006-12-14 Thread Duncan Murdoch
[EMAIL PROTECTED] wrote: Dear R Users, I have a matrix A, and I want to change every value of this matrix if these values are greater than an assuming value. For a vector it is simple, e.g. a-c(1:10); a[a5]-0. Of course, I can change matrix to vector, assign a value then change vector to

[R] The Balvenie : Remportez trois whisky d'exception

2006-12-14 Thread The Balvenie
Si vous désirez visualiser ce mail au format html, recopiez l'adresse suivante dans votre navigateur: http:///view.html?id=2825ref=396150 Si vous désirez vous désinscrire, il suffit de cliquer sur le lien prévu ou de recopier l'adresse suivante dans votre navigateur:

Re: [R] Delete all dimnames

2006-12-14 Thread Sarah Goslee
On 12/14/06, Serguei Kaniovski [EMAIL PROTECTED] wrote: Hello, how can I get rid of all dimnames so that: test a b c A 1 4 7 B 2 5 8 C 3 6 9 dimnames(test) - list(NULL, NULL) test [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 Sarah -- Sarah Goslee

Re: [R] matrix - change values

2006-12-14 Thread apjaworski
Rob, Try a[a5]-0 Yup. It works for matrices (and for arrays). It also works with the replacement value being a vector. For example, try b - array(1:24, dim=c(3, 4, 2)) b[(b8) (b17)] - 101:108 I think the reason it works like this is that internally array are stored as vectors. Cheers,

[R] Asymmetrical ANOVA / contrasts

2006-12-14 Thread Joachim Claudet
Dear all, I have problems to code contrasts for performing an asymmetrical anova with aov(). I am using aov() because I want to get the Mean Squares for further analyses. I didn't find any solution to my problem in the help files of functions aov(), contrasts(), C(), etc. Let's say I have

[R] Stepwise regression

2006-12-14 Thread Timothy . Mak
Dear all, I am wondering why the step() procedure in R has the description 'Select a formula-based model by AIC'. I have been using Stata and SPSS and neither package made any reference to AIC in its stepwise procedure, and I read from an earlier R-Help post that step() is really the

[R] Stepwise regression

2006-12-14 Thread Timothy . Mak
Dear all, I am wondering why the step() procedure in R has the description 'Select a formula-based model by AIC'. I have been using Stata and SPSS and neither package made any reference to AIC in its stepwise procedure, and I read from an earlier R-Help post that step() is really the

Re: [R] matrix - change values

2006-12-14 Thread robert-mcfadden
I would like to thanks everybody for helpful suggestion. Rob Od: [EMAIL PROTECTED] Do: r-help@stat.math.ethz.ch Data: 14 grudnia 2006 15:01 Temat: [R] matrix - change values Dear R Users, I have a matrix A, and I want to change every value of this matrix if these values are greater than an

Re: [R] two connected graphs

2006-12-14 Thread John Kane
--- Robin Hankin [EMAIL PROTECTED] wrote: Hi I have two datasets, A and B, consisting of two columns of numbers representing x and y coordinates. They have 10 and 6 rows respectively. I want to plot two scattergraphs, one above the other. The lower graph to contain A (10 points)

Re: [R] Stepwise regression

2006-12-14 Thread Marc Schwartz
On Thu, 2006-12-14 at 14:37 +, [EMAIL PROTECTED] wrote: Dear all, I am wondering why the step() procedure in R has the description 'Select a formula-based model by AIC'. I have been using Stata and SPSS and neither package made any reference to AIC in its stepwise procedure, and I

Re: [R] two connected graphs

2006-12-14 Thread Greg Snow
See the first set of examples in the help for the cnvrt.coords function in the TeachingDemos Package. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED]

[R] convert shingle to factor when overlap=0

2006-12-14 Thread Benjamin Tyner
What is the recommended way to convert a shingle to a factor (when overlap=0)? In other words, I want to know in which interval each observation falls. Thanks, Ben __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] How to avoid test for NAs in foreign function call

2006-12-14 Thread Tony Plate
Supply NAOK=TRUE argument to .C; the help page for .C() contains the following: Usage .C(name, ..., NAOK = FALSE, DUP = TRUE, PACKAGE) Also, you might want to consider using the raw data type instead of integers -- that way you should have fewer problems with R code making

[R] Problems with ARIMA commands

2006-12-14 Thread Livio Fenga
Hi! I have to fit 36 ARMA models (all combination from the order (0,0) to the order (5,5) ) to 1000 bootstrap replication from each of 1000 simulated time series following an ARMA(2,1) process. The simulated series are generated by ARIMA.SIM command. The problem is the following: the

[R] Asymmetrical ANOVA / contrasts

2006-12-14 Thread Joachim Claudet
Dear all, I have problems to code contrasts for performing an asymmetrical anova with aov(). I am using aov() because I want to get the Mean Squares for further analyses. I didn't find any solution to my problem in the help files of functions aov(), contrasts(), C(), etc. Let's say I have

Re: [R] Asymmetrical ANOVA / contrasts

2006-12-14 Thread Greg Snow
You need to specify the how.many argument to C (otherwise it tries to be helpful by creating an additional orthogonal contrast), like this: aov(X~C(loc,c(2,-1,-1),how.many=1)) One of the ways to see what is going on is to do: fit1 - aov(X~C(loc,c(2,-1,-1)), x=TRUE) fit2 -

Re: [R] matrix - change values

2006-12-14 Thread Greg Snow
A matrix is already a vector, you don't need to do the transformations, just do the same thing directly: tmp - matrix( sample(1:12), ncol=3 ) tmp [,1] [,2] [,3] [1,] 1116 [2,]379 [3,]4 128 [4,]25 10 tmp[tmp 5] - 0 tmp [,1] [,2] [,3] [1,]

[R] Better way to change the name of a column in a dataframe?

2006-12-14 Thread Ben Fairbank
Hello R users -- If I have a dataframe such as the following, named frame with the columns intended to be named col1 through col6, frame col1 col2 cmlo3 col4 col5 col6 [1,]3 10 2657 [2,]68 4 1071 [3,]75 1318

Re: [R] sapply problem

2006-12-14 Thread jim holtman
try this: b - as.matrix(do.call('rbind', lapply(a,'[[','df'))) str(b) num [1:2, 1:3] 1 4 2 5 3 6 - attr(*, dimnames)=List of 2 ..$ : chr [1:2] 1 2 ..$ : chr [1:3] A B C colMeans(b) A B C 2.5 3.5 4.5 b A B C 1 1 2 3 2 4 5 6 On 12/14/06, Joerg van den Hoff [EMAIL PROTECTED]

Re: [R] sapply problem

2006-12-14 Thread Weiwei Shi
c - apply(b, c(1,2), unlist) c A B C [1,] 1 2 3 [2,] 4 5 6 class(c[1,1]) [1] numeric On 12/14/06, Joerg van den Hoff [EMAIL PROTECTED] wrote: I have encountered the following problem: I need to extract from a list of lists equally named compenents who happen to be 'one row' data

[R] persistant: Matlab-R

2006-12-14 Thread Bernard Gregory
Dear list members, Could anyone tell me if there is an equivalent of the Matlab declaration 'persistant' in R? Thank you very much, Bernard Gregorry. (Matlaber converted to R). - [[alternative HTML version deleted]]

Re: [R] sapply problem

2006-12-14 Thread Sundar Dorai-Raj
Joerg van den Hoff said the following on 12/14/2006 7:30 AM: I have encountered the following problem: I need to extract from a list of lists equally named compenents who happen to be 'one row' data frames. a trivial example would be: a - list(list( df = data.frame(A = 1, B = 2, C = 3)),

Re: [R] two connected graphs

2006-12-14 Thread Charles C. Berry
On Thu, 14 Dec 2006, Robin Hankin wrote: Hi I have two datasets, A and B, consisting of two columns of numbers representing x and y coordinates. They have 10 and 6 rows respectively. I want to plot two scattergraphs, one above the other. The lower graph to contain A (10 points) and the

Re: [R] xyplot: discrete points + continuous curve per panel

2006-12-14 Thread Rene Braeckman
I will give this a try. However, this is based on row and columns of the panels and not on the SUBJ and DOSE information that I need to calculate the continuous curve. Rene -Original Message- From: Petr Pikal [mailto:[EMAIL PROTECTED] Sent: Thursday, December 14, 2006 1:18 AM To:

Re: [R] Stepwise regression

2006-12-14 Thread Greg Snow
You may want to look at a book that was published more recently than 17 years ago (computing has changed a lot since then). Doing stepwise regression using p-values is one approach (and when p-values were the easiest (only) thing to compute, it was reasonable to use them). But think about how

[R] Model formula

2006-12-14 Thread Ronaldo Prati
Hi there, I've sent this e-mail to the list twice but didn't get it back from the list. Have it reach list members? cheers, Ronaldo -- Forwarded message -- From: Ronaldo Prati [EMAIL PROTECTED] Date: 14/12/2006 11:59 Subject: Model formula question To: r-help@stat.math.ethz.ch

[R] rotated histogram

2006-12-14 Thread steve
I would like to make a scatterplot, with a histogram of the x and y variables above and to the right . I can use layout to set up the areas, and hist(x,y) works fine for the upper histogram. However, I need a rotated histogram on the right, and I don't know how to do this. I've seen a solution

Re: [R] rotated histogram

2006-12-14 Thread Marc Schwartz
On Thu, 2006-12-14 at 13:53 -0500, steve wrote: I would like to make a scatterplot, with a histogram of the x and y variables above and to the right . I can use layout to set up the areas, and hist(x,y) works fine for the upper histogram. However, I need a rotated histogram on the right,

Re: [R] two connected graphs

2006-12-14 Thread Paul Murrell
Hi Charles C. Berry wrote: On Thu, 14 Dec 2006, Robin Hankin wrote: Hi I have two datasets, A and B, consisting of two columns of numbers representing x and y coordinates. They have 10 and 6 rows respectively. I want to plot two scattergraphs, one above the other. The lower graph to

Re: [R] persistant: Matlab-R

2006-12-14 Thread Charles Annis, P.E.
It might be helpful to those not familiar with Matlab to tell us what function persistent does. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

Re: [R] Error to install fMultivar package

2006-12-14 Thread gsmatos1
Hello, I tried the first issue of Dirk and it was all right: This would be quicker: $ sudo apt-get install r-cran-fmulitvar (I've already had enabled the Universe repositories in /etc/apt/sources.list. ) I think it was realy related with some lib and packages dependencies.

Re: [R] two connected graphs

2006-12-14 Thread hadley wickham
If you're not already familiar with M N plots (by Diaconis and Friedman), you should have a look at: http://www.slac.stanford.edu/cgi-wrap/getdoc/slac-pub-2495.pdf Hadley On 12/14/06, Robin Hankin [EMAIL PROTECTED] wrote: Hi I have two datasets, A and B, consisting of two columns of numbers

Re: [R] How do I create an object in the Global environment from a function

2006-12-14 Thread Henrik Bengtsson
Please note that help(-) says: The operators '-' and '-' cause a search to made through the environment for an existing definition of the variable being assigned. If such a variable is found (and its binding is not locked) then its value is redefined, otherwise assignment takes

Re: [R] persistant: Matlab-R

2006-12-14 Thread Roy Mendelssohn
At 3:10 PM -0500 12/14/06, Charles Annis, P.E. wrote: It might be helpful to those not familiar with Matlab to tell us what function persistent does. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com Independent response (I was

Re: [R] persistant: Matlab-R

2006-12-14 Thread Charles C. Berry
It is just my guess that the 'open.account' example in 10.7 Scope of Introduciton to R is what you are after. If I understand what 'presistent' means, the 'total' in the example is approximately equal to a persistent variable. On Thu, 14 Dec 2006, Bernard Gregory wrote: Dear list members,

Re: [R] xyplot: discrete points + continuous curve per panel

2006-12-14 Thread Deepayan Sarkar
On 12/13/06, RMan54 [EMAIL PROTECTED] wrote: I have a number of x, y observations (Time, Conc) for a number of Subjects (with subject number Subj) and Doses. I can plot the individual points with xyplot fine: xyplot(Conc ~ Time | Subj, Groups=Dose, data=myData,

[R] max.col: bug or just oddity?

2006-12-14 Thread John Zedlewski
I've noticed that the max.col function with the default random option often gives unexpected results. For instance, in this test, it seems clear what the answer should be: # second col should always be max x1 = cbind(1:10, 2:11, -Inf) # this works fine max.col(x1, first) [1] 2 2 2 2 2 2 2 2

Re: [R] persistant: Matlab-R

2006-12-14 Thread Greg Snow
It looks like the same process can be accomplished by using 'local' and declaring the 'persistant' variables in a local scope, then the function within that same scope, for example: inc - local( { n - 0; function(){n - n + 1; return(n)} } ) inc function(){n - n + 1; return(n)} environment:

Re: [R] rotated histogram

2006-12-14 Thread steve
I guess it's ok; I was wondering why there is no argument to hist that allows rotation (e.g. rotated=TRUE) Steve Marc Schwartz wrote: On Thu, 2006-12-14 at 13:53 -0500, steve wrote: I would like to make a scatterplot, with a histogram of the x and y variables above and to the right . I

[R] Better way to change the name of a column in a dataframe?

2006-12-14 Thread Benjamin Tyner
Ben, Unless I misunderstand your question, why not just use names(frame)[3]-col3 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] Nicely formatted tables

2006-12-14 Thread steve
If I use latex(summary(X)) where X is a data frame with four variables I get something like Rainfall Education PopdenNonwhite Min. :10.00 Min. : 9.00 Min. :1441 Min. : 0.80 1st Qu.:32.75 1st Qu.:10.40 1st Qu.:3104 1st Qu.: 4.95 Median

Re: [R] Nicely formatted tables

2006-12-14 Thread Peter Dalgaard
steve wrote: If I use latex(summary(X)) where X is a data frame with four variables I get something like Rainfall Education PopdenNonwhite Min. :10.00 Min. : 9.00 Min. :1441 Min. : 0.80 1st Qu.:32.75 1st Qu.:10.40 1st Qu.:3104 1st Qu.:

Re: [R] Nicely formatted tables

2006-12-14 Thread Marc Schwartz
On Thu, 2006-12-14 at 16:37 -0500, steve wrote: If I use latex(summary(X)) where X is a data frame with four variables I get something like Rainfall Education PopdenNonwhite Min. :10.00 Min. : 9.00 Min. :1441 Min. : 0.80 1st Qu.:32.75 1st

Re: [R] Better way to change the name of a column in a dataframe?

2006-12-14 Thread Mike Prager
Ben Fairbank [EMAIL PROTECTED] wrote: [...] I want to correct or otherwise change the name of one of the columns, I can do so with dimnames(frame)[[2]][which(dimnames(frame)[[2]]==cmlo3)] - col3 This seems cumbersome and not very intuitive. How can one accomplish this more simply?

[R] legend/plotmath/substitute problem

2006-12-14 Thread Philipp Pagel
Dear R Experts, I am trying to produce a legend for a series of plots which are generated in a loop. The legend is supposed to look like this: 2000: gamma=1.8 where gamma is replaced by the greek letter and both the year and the value of gamma are stored in variables. Everything works

Re: [R] Nicely formatted tables

2006-12-14 Thread Kuhn, Max
How about: apply(iris[, 1:4], 2, summary) Sepal.Length Sepal.Width Petal.Length Petal.Width Min. 4.300 2.0001.000 0.100 1st Qu.5.100 2.8001.600 0.300 Median 5.800 3.0004.350 1.300 Mean 5.843

Re: [R] Nicely formatted tables

2006-12-14 Thread Marc Schwartz
On Thu, 2006-12-14 at 17:09 -0500, Kuhn, Max wrote: How about: apply(iris[, 1:4], 2, summary) Sepal.Length Sepal.Width Petal.Length Petal.Width Min. 4.300 2.0001.000 0.100 1st Qu.5.100 2.8001.600 0.300 Median 5.800

Re: [R] Better way to change the name of a column in a dataframe?

2006-12-14 Thread Andrew Robinson
Hi, names(frame)[names(frame) == cmlo3] - col3 should also work Cheers Andrew On Thu, Dec 14, 2006 at 05:05:20PM -0500, Mike Prager wrote: Ben Fairbank [EMAIL PROTECTED] wrote: [...] I want to correct or otherwise change the name of one of the columns, I can do so with

Re: [R] Install R in Linux

2006-12-14 Thread John C Frain
Perhaps you might have a look at the quantian live distribution. If you can boot your PC from this you have access to R and you should be able to acess and use any data files on your hard disk. The current Quantian live DVD is based on Knoppix 4.02 (I think). I have installed the Quantian DVD

Re: [R] legend/plotmath/substitute problem

2006-12-14 Thread Duncan Murdoch
On 12/14/2006 5:05 PM, Philipp Pagel wrote: Dear R Experts, I am trying to produce a legend for a series of plots which are generated in a loop. The legend is supposed to look like this: 2000: gamma=1.8 where gamma is replaced by the greek letter and both the year and the value

Re: [R] legend/plotmath/substitute problem

2006-12-14 Thread Philipp Pagel
On Thu, Dec 14, 2006 at 06:25:49PM -0500, Duncan Murdoch wrote: On 12/14/2006 5:05 PM, Philipp Pagel wrote: My problem starts, when I want to put more than one series of data in the plot and accordingly need one legend row per data series: year1 = 2001 year2 = 2005 g1 = 1.9 g2 = 1.7

Re: [R] Contents of R-packages

2006-12-14 Thread Milton Cezar Ribeiro
How about library(help=yags) miltinho Chuck Cleland [EMAIL PROTECTED] escreveu: Ralf Finne wrote: Hi experts, How do I see the contents of a package that looks interesting? Efter I have loded the package, is there an command that gives me the contents or even better a summary

Re: [R] Nicely formatted tables

2006-12-14 Thread steve
apply(iris[, 1:4], 2, summary) Nice solution! However, latex(apply(iris[, 1:4], 2, summary)) has the odd effect that the upper left corner is apply. This is the title, so to produce a file abc.tex and have an empty upper left corner you need latex(apply(iris[, 1:4], 2,

[R] sorting by name

2006-12-14 Thread Brooke LaFlamme
Hi all, I'm not sure that there is really a way to do this, but I thought I'd see if anyone knew. I have a file with 1 to n columns all named something like X1, X2, X3Xn. I have another file that has in one column n number of rows. Each row has a number in it (not in order; the ordering

Re: [R] sorting by name

2006-12-14 Thread Bert Gunter
This is trivial. help([) and An Introduction to R will tell you how. P.S. As earlier posts today have mentioned, stepwise variable selection is generally a bad idea. Bert Gunter Genentech Nonclinical Statistics South San Francisco, CA 94404 -Original Message- From: [EMAIL PROTECTED]

Re: [R] xyplot: discrete points + continuous curve per panel

2006-12-14 Thread RMan54
Great. I will be trying to use panel.curve and pass a custom curve function as first argument (called test() below). I can use which. packet to get access to the panel number to produce the correct curve for each panel but what I really need is the active Subj (actSubj) for each panel. Not sure

[R] How to load Rcmd without Commander() ?

2006-12-14 Thread ronggui
I would like to use the reliability() function in Rcmdr package, but not the GUI, so I would to load Rcmd without Commander() running automatically. Is there any easy way to get it? Thanks. -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China 黄荣贵 复旦大学社会学系

Re: [R] Better way to change the name of a column in a dataframe?

2006-12-14 Thread Joerg van den Hoff
Ben Fairbank wrote: Hello R users -- If I have a dataframe such as the following, named frame with the columns intended to be named col1 through col6, frame col1 col2 cmlo3 col4 col5 col6 [1,]3 10 2657 [2,]68 4 1071