Re: [R] simplification of code using stamp?

2006-10-26 Thread Rainer M Krug
hadley wickham wrote: I get the following, which is not what I am looking for. test[1:10,] expertxx seeds runvalue 1 BW x001025 1 rsqs, slope, d.slope, intercept, d.intercept 2 BW x001025 2 rsqs, slope, d.slope,

[R] Error bars in ggplot?

2006-10-26 Thread Rainer M Krug
Hi Is it possible to put error bars in ggplot? I couldn't find anything so far. Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology and Entomology University of Stellenbosch Matieland 7602 South Africa Tel:+27 - (0)72

[R] Installation of RGrace

2006-10-26 Thread Rainer M Krug
Hi I try to install RGrace, but always get the following error below. Might it have to do that RGtk is not installed and where can I find it to install it? I have GTK 1.2.10 installed. My R version and platform: version _ platform i686-pc-linux-gnu arch i686

Re: [R] Read.csv

2006-10-26 Thread Petr Pikal
Hi On 26 Oct 2006 at 10:31, Wang, Joshua (EQS) wrote: Date sent: Thu, 26 Oct 2006 10:31:00 +0900 From: Wang, Joshua (EQS) [EMAIL PROTECTED] To: Murray Pung [EMAIL PROTECTED] Copies to: r-help@stat.math.ethz.ch Subject:

Re: [R] Read.csv

2006-10-26 Thread Philipp Pagel
On Thu, Oct 26, 2006 at 09:41:25AM +0900, Wang, Joshua (EQS) wrote: Are there ways to load a csv file without row.names by read.csv? Thanks. Have a look at ?read.csv. Somewhere in there you will find an explanation for the option row.name. In your case, you probably want to set it to NULL. cu

Re: [R] Read.csv

2006-10-26 Thread Peter Dalgaard
Petr Pikal [EMAIL PROTECTED] writes: Hi On 26 Oct 2006 at 10:31, Wang, Joshua (EQS) wrote: Date sent:Thu, 26 Oct 2006 10:31:00 +0900 From: Wang, Joshua (EQS) [EMAIL PROTECTED] To: Murray Pung [EMAIL PROTECTED] Copies to:

Re: [R] how to improve the efficiency of the following lapply codes [Broadcast]

2006-10-26 Thread Liaw, Andy
Make good use of Rprof(): It has helped me a great deal in pinpointing bottlenecks where I would not have suspected. Cheers, Andy From: Weiwei Shi object.size(intersect.matrix) 41314204 but my machine has 4 G memory, so it should be ok since after 12 hours, it finishes 16k out of 60k

[R] Quantile regression questions

2006-10-26 Thread Brian Gardunia
I am relatively new to R, but am intrigued by its flexibility. I am interested in quantile regression and quantile estimation as regards to cotton fiber length distributions. The length distribution affects spinning and weaving properties, so it is desirable to select for certain distribution

Re: [R] Error bars in ggplot?

2006-10-26 Thread hadley wickham
Is it possible to put error bars in ggplot? I couldn't find anything so far. Have a look at ggerrorbar. Hadley __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Error bars in ggplot?

2006-10-26 Thread Rainer M Krug
hadley wickham wrote: Is it possible to put error bars in ggplot? I couldn't find anything so far. Have a look at ggerrorbar. Thanks - exactly what I was looking for. By the way - ggerrorbar is not mentioned in ?ggplot. Rainer Hadley __

[R] legends in ggplot

2006-10-26 Thread David Barron
Is it possible to change the legend title in ggplot that is generated by a colour (other than by changing the name of the variable)? For example, this produces a legend title, tip/total_bill. How can that title be changed?

[R] distance between legend title and legend box

2006-10-26 Thread Denis Chabot
Hi, I've looked at the parameters available for the legend function and cannot find a way to change the distance between the top of the box surrounding a legend and the legend's title. I have a math expression that raises the height of my title. If you don't mind the non-sensical title I

[R] Measurements of 3000 criminals

2006-10-26 Thread Dietrich Trenkler
Hallo everyone, excuse me if this is not a genuine R question but I do not know where to ask else. Referring to e.g. https://stat.ethz.ch/pipermail/r-help/2004-December/062114.html I wonder if these measurements of 3000 criminals (raw data) are available anywhere. At least I didn't find them

Re: [R] distance between legend title and legend box

2006-10-26 Thread David Barron
I don't know if there is a nice, easy way of doing this, but this method will work: with(iris, plot(Sepal.Length, Sepal.Width, pch=as.numeric(Species), cex=1.2)) lg-legend(6.5, 4.2, c(setosa, versicolor, virginica), cex=1, pch=1:3, title=expression(kg/km^2), bty=n) x1 -

Re: [R] legends in ggplot

2006-10-26 Thread hadley wickham
Is it possible to change the legend title in ggplot that is generated by a colour (other than by changing the name of the variable)? For example, this produces a legend title, tip/total_bill. How can that title be changed?

Re: [R] Measurements of 3000 criminals

2006-10-26 Thread Ben Bolker
Dietrich Trenkler Dietrich.Trenkler at uni-osnabrueck.de writes: Hallo everyone, excuse me if this is not a genuine R question but I do not know where to ask else. Referring to e.g. https://stat.ethz.ch/pipermail/r-help/2004-December/062114.html I wonder if these measurements of

Re: [R] How to specify a constant in gnls{nlme}

2006-10-26 Thread Jost Burkardt
Hi, It works for me if i encapsulate the formula within a function a =1; b=1; f1 - function(x,v,w) {a/(b+(x/v)^w)} fm2 = gnls( y ~ f1(x,v,w), start=list( v=1, w=1)) Regards, Jost hong qin [EMAIL PROTECTED] writes: Hi All, I have question about speficifying a constant in gnls() from

[R] Up- or downsampling time series in R

2006-10-26 Thread Brandt, T. (Tobias)
Hi I have data that is sampled (in time) with a certain frequency and I would like to express this time series as a time series of a higher (or lower) frequency with the newly added time points being filled in with NA, 0, or perhaps interpolated. My data might be regularly or irregularly spaced.

[R] pairs matchning

2006-10-26 Thread Federico Calboli
Hi All, I have two numerical matrices of 2 columns and many rows. The two coulumns of matrix (1) form a number of 'pairs' of numbers, e.g: [,1] [,2] [1,]10 [2,]34 [3,]34 [4,]58 [5,]10 [6,]10 [7,]67 Matrix (2) contains the *unique*

Re: [R] avoiding a loop

2006-10-26 Thread chao gai
Mark, This is hardly a one-liner. It will only help you if you call it with large objects. If you have 0 in your data it needs even more extending. Here it is: myconstruct - function(aa) { aa - c(1,1,aa,1) bb - cumprod(aa) taa - aa1 difftaa - diff(taa) starts -

Re: [R] pairs matchning

2006-10-26 Thread TobiasBr
Hi You could try to find an equivalent representation as a string and try to match those. (A - cbind(sample(1:2, 10, rep=TRUE), sample(1:2, 10, rep=TRUE))) [,1] [,2] [1,]12 [2,]12 [3,]12 [4,]22 [5,]11 [6,]12 [7,]12 [8,]1

Re: [R] pairs matchning

2006-10-26 Thread chao gai
Federico, Why not 1 convert to data frame dfo - as.data.frame(mat) 2 take unique items with ?unique df- unique(dfo) 3 add an index to the unique itmes df$unique - 1:nrow(df) 4 merge the two data.frames combi - merge(dfo,df) 5 extract the index? combi$unique Kees On Thursday 26

Re: [R] Quantile regression questions

2006-10-26 Thread roger koenker
Brian, It is hard to say at this level of resolution of the question, but it would seem that you might be able to start by considering each sample vector as as repeated measurement of the fiber length -- so 12 obs in the first 1/16th bin, 235 in the next and so forth, all associated with

Re: [R] pairs matchning

2006-10-26 Thread Ben Fairbank
If all of the numbers are one-digit numbers, as your subset shows, you can create a third column equal to 10 * col 1 + col 2, and then use match() on the resulting two-digit numbers, no? If the numbers are larger than one-digit, and you know the maximum, use that rather than 10 as the multiplier.

Re: [R] Up- or downsampling time series in R

2006-10-26 Thread Achim Zeileis
On Thu, 26 Oct 2006, Brandt, T. (Tobias) wrote: I have data that is sampled (in time) with a certain frequency and I would like to express this time series as a time series of a higher (or lower) frequency with the newly added time points being filled in with NA, 0, or perhaps interpolated.

Re: [R] cloud() works but wireframe() is blank

2006-10-26 Thread Larry Layne
--On Wednesday, October 25, 2006 4:46 PM -0700 Deepayan Sarkar [EMAIL PROTECTED] wrote: On 10/25/06, Larry Layne [EMAIL PROTECTED] wrote: Per the message from Alexander Nervedi, 29 April 2006: I have to be making a riddiculously silly ommission. when I run the fillowing i get the cloud

[R] Header of dataframe

2006-10-26 Thread Benjamin Dickgiesser
Hi I am fairly new to R and I would appreciate some help to hopefully a trivial problem. I created a function: summary.aggregate - function(y, ...) { temp.mean - aggregate(y, FUN=mean, ...) temp.sd - aggregate(y, FUN=sd, ...) temp.length -

[R] function to normalize vectors?

2006-10-26 Thread Daniel Elliott
Hello all. I can find no function to compute norms (even the basic two-norm) of a vector in the online help (within the GUI) or the downloadable documentation. Thanks. - dan elliott [[alternative HTML version deleted]] __

[R] Generating tables

2006-10-26 Thread Benjamin Dickgiesser
I am actually trying to write something above the first column ( in the example the column with numbers 1 to 8) is this possible at all? If not, is there another way to make a table which supports this? I am merely using a data frame as a way to create a table I don't need the data to be this data

Re: [R] help fo finding R package utils

2006-10-26 Thread Christos Hatzis
Amina, The best way for entering data in R is by importing an existing data file (text, Excel etc). This will reduce time and potential data entry errors. Please read Section 7 of the Introduction to R manual for a detailed discussion of available options. The manuals are available on your

[R] Query about using table

2006-10-26 Thread lalitha viswanath
Hi I have data of the following form ID age member_FLAG 125 Y 236.75 N 375.5N . . I want to get a histogram of this data showing distribution of member_flag in each age-bin i.e. how many values in each age bin have a member_flag of 'Y' and how many have

[R] Query about using table

2006-10-26 Thread lalitha viswanath
Hi I have data of the following form ID age member_FLAG 125 Y 236.75 N 375.5N . . I want to get a histogram of this data showing distribution of member_flag in each age-bin i.e. how many values in each age bin have a member_flag of 'Y' and how many have

Re: [R] help fo finding R package utils

2006-10-26 Thread Christos Hatzis
Please reply to the list, not to me personally. When I want to import an Excel file, I usually save it as a tab-delimited text file and use read.delim to import it: my.dataframe - read.delim(file.name.txt, header=TRUE, sep=\t) See ?read.delim for further details. There are many other

[R] latent class model

2006-10-26 Thread karen xie
Dear List, I try to implement the latent class model with the unknown number of classes. I wonder whether someone can provide me some sample codes. Thank you for your help. Karen [[alternative HTML version deleted]] __

Re: [R] Query about using table

2006-10-26 Thread apjaworski
Lalitha, Try something like with(data, table(cut(age, n), member_FLAG)) where data is a data frame with columns named age and member_FLAG and n is the number of age categories (bins) you want. This will give you the number of Ys and Ns in each bin, that you will need to convert to percentages.

Re: [R] distance between legend title and legend box

2006-10-26 Thread Paul Murrell
Hi Denis Chabot wrote: Hi, I've looked at the parameters available for the legend function and cannot find a way to change the distance between the top of the box surrounding a legend and the legend's title. I have a math expression that raises the height of my title. If you

[R] Newbie: Better way to do compound conditionals in subset?

2006-10-26 Thread Zembower, Kevin
There must be a better way to select the rows after 22-Apr-2004 and before 01-Sep-2004 with a temperature below 65 than this: before2sw1 - subset(energy.data, as.Date(start, format=%d-%b-%y) as.Date(01-Sep-04, format = %d-%b-%y)) before2sw2 - subset(before2sw1, as.Date(start, format=%d-%b-%y)

[R] Turn off border on barplot

2006-10-26 Thread Frank McCown
I was wondering if there was any way to completely remove the borders around each bar when using the barplot function. I understand how to change the color of the border (border=white), but I need the border to be invisible so I can plot many skinny bars right next to each other with only the

Re: [R] Newbie: Better way to do compound conditionals in subset?

2006-10-26 Thread Jeffrey Robert Spies
I would personally use the following method (example using the iris data included with R): data(iris) tSelect - (iris$Sepal.Length 6.0 iris$Sepal.Length 6.2 iris $Sepal.Width == 3.0) tSelectedData - iris[tSelect,] Then you can simply work with tSelectedData for whatever equation you

[R] applying order() in a for loop

2006-10-26 Thread Kim Milferstedt
Hi, with the code below I try to organize sections of a data.frame. The dataframe has 9 data columns. I'd like to order the columns of the data.frame by the sum of the columns' entries. The sections of the columns are identified by i. The order of the columns is given by the vector z. Each

Re: [R] Header of dataframe

2006-10-26 Thread Mihai Nica
names(temp)[1]=a see: ?names did you really created that function :-)? Mihai Nica 170 East Griffith St. G5 Jackson, MS 39201 601-914-0361 - Original Message From: Benjamin Dickgiesser [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, October 26, 2006 12:08:08 PM Subject:

Re: [R] Turn off border on barplot

2006-10-26 Thread Marc Schwartz
On Thu, 2006-10-26 at 16:13 -0400, Frank McCown wrote: I was wondering if there was any way to completely remove the borders around each bar when using the barplot function. I understand how to change the color of the border (border=white), but I need the border to be invisible so I can

Re: [R] Newbie: Better way to do compound conditionals in subset?

2006-10-26 Thread Peter Dalgaard
Jeffrey Robert Spies [EMAIL PROTECTED] writes: I would personally use the following method (example using the iris data included with R): data(iris) tSelect - (iris$Sepal.Length 6.0 iris$Sepal.Length 6.2 iris $Sepal.Width == 3.0) tSelectedData - iris[tSelect,] Then you can

[R] Organisation of medium/large projects with multiple analyses

2006-10-26 Thread Mark Wardle
Dear all, I'm still new to R, but have a fair experience with general programming. All of my data is stored in postgresql, and I have a number of R files that generate tables, results, graphs etc. These are then available to be imported into powerpoint/latex etc. I'm using version control

Re: [R] Turn off border on barplot

2006-10-26 Thread Paul Murrell
Hi Marc Schwartz wrote: On Thu, 2006-10-26 at 16:13 -0400, Frank McCown wrote: I was wondering if there was any way to completely remove the borders around each bar when using the barplot function. I understand how to change the color of the border (border=white), but I need the border

Re: [R] Turn off border on barplot

2006-10-26 Thread Frank McCown
barplot(1:10, border=NA) That's it! Thanks a ton, guys. Frank __ 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 provide commented,

Re: [R] Header of dataframe

2006-10-26 Thread Benjamin Dickgiesser
Thx for the help but again, this is not what I am looking for. I need the a to be over the first column e.g. ameanstdev n 1 645.6125 65.94129 60 2 655.2121 70.64094 60 3 633.3161 80.48620 60 4 650.3897 77.59191 60 5 630.4955 84.9 60 6 656.2608 66.16100 60 7 666.1775 74.39796 60

Re: [R] Turn off border on barplot

2006-10-26 Thread Marc Schwartz
On Fri, 2006-10-27 at 10:00 +1300, Paul Murrell wrote: Hi Marc Schwartz wrote: On Thu, 2006-10-26 at 16:13 -0400, Frank McCown wrote: I was wondering if there was any way to completely remove the borders around each bar when using the barplot function. I understand how to change

Re: [R] Header of dataframe

2006-10-26 Thread Mihai Nica
Oh, I can see now what you mean. That's beyond me, but... why :-)? Mihai Nica 170 East Griffith St. G5 Jackson, MS 39201 601-914-0361 - Original Message From: Benjamin Dickgiesser [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, October 26, 2006 4:35:20 PM Subject: Re:

Re: [R] Newbie: Better way to do compound conditionals in subset?

2006-10-26 Thread Marc Schwartz
On Thu, 2006-10-26 at 15:55 -0400, Zembower, Kevin wrote: There must be a better way to select the rows after 22-Apr-2004 and before 01-Sep-2004 with a temperature below 65 than this: before2sw1 - subset(energy.data, as.Date(start, format=%d-%b-%y) as.Date(01-Sep-04, format = %d-%b-%y))

[R] Adding shading to background of Time series plot

2006-10-26 Thread jmbucci
Hello All, Thank you in advance. I have looked up and down in the archives to see if I could find some help on moving the polygons to the background of a ts.plot. I've tried panel.first in the gpars(...) arguments and trellis.focus, but I get errors. Am I missing something easy here? Here is my

[R] A faster way to calculate Trace?

2006-10-26 Thread YONGWAN CHUN
I want to know how to get trace of product of matrices **faster** when the matrices are really big. Unfortunately the matrices are not symmetric. If anybody know how to get the trace of it, please help me. An example is as below. n - 2500 a - matrix(rnorm(n*n),n,n) b - matrix(rnorm(n*n),n,n)

Re: [R] Get the names of the columns in a tserie

2006-10-26 Thread lvdtime
Please, I need this information, it's important for my work Thank you. lvdtime wrote: Hello everybody, I'm a beginner in R, and I'm currently working on Tseries (analysis of a portfolio) I imported the data like this (library tseries) : X-read.ts(X.dat, start=c(1995,1),

Re: [R] A faster way to calculate Trace?

2006-10-26 Thread Berwin A Turlach
G'day Yongwan, YC == YONGWAN CHUN [EMAIL PROTECTED] writes: YC I want to know how to get trace of product of matrices YC **faster** when the matrices are really big. Unfortunately the YC matrices are not symmetric. If anybody know how to get the YC trace of it, please help me.

Re: [R] Tukey-Kramer test

2006-10-26 Thread Spencer Graves
RSiteSearch(Tukey-Kramer) produced 7 hits for me just now. Have you looked at these? If yes, please provide a commented, minimal, self-contained, reproducible example of something you've tried, explaining why it did not meet your needs, as suggested in the posting guide

[R] barcharts with 2 different axes

2006-10-26 Thread Geoff Russell
Dear UseRs, I'm having trouble drawing a barchart with 2 quantities in different units as follows with one unit on the top axis and the other unit on the bottom. E.g., x Tonnes | . . . Row 1 Tonnes1 | xx Row 1 Litres1 | yyy

Re: [R] Adding shading to background of Time series plot

2006-10-26 Thread Gabor Grothendieck
There is an example here using plot http://www.mayin.org/ajayshah/KB/R/html/g5.html and an example here using xyplot.zoo: library(zoo) ?xyplot.zoo that would also work with xyplot.ts On 10/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello All, Thank you in advance. I

[R] VGAM package released on CRAN

2006-10-26 Thread Thomas Yee
Dear useRs, upon request, the VGAM package (currently version 0.7-1) has been officially released on CRAN (the package has been at my website http://www.stat.auckland.ac.nz/~yee/VGAM for a number of years now). VGAM implements a general framework for several classes of regression models using

Re: [R] avoiding a loop

2006-10-26 Thread Ray Brownrigg
On Wednesday 25 October 2006 07:36, Leeds, Mark (IED) wrote: I think I asked a similar question 3 years ago to the Splus list and I think the answer was no or noone answered so noone should spend more than 5 minutes on this because it could definitely be a waste of time. My question is

[R] Dum: problem installing (Don't install at all)

2006-10-26 Thread Daniel Sarrazin
I'm on mandriva 2006 I did: urpmi R-2.0.0-1mdk.i586.rpm got the message: Some asked package can't be intalled: R-2.0.0-1mdk.i586 (due to unsatified) Continue ? (Y/N) Then after I try typping R on the shell and it does work. Of course there is no R reposatory Thank Daniel ##

[R] How to call Fortran routin in R

2006-10-26 Thread lan gao
Hi, all, Can anyone give me steps how to call Fortan routine from Visual Fortran in R? Many thanks Gao [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Header of dataframe

2006-10-26 Thread Gregor Gorjanc
Benjamin Dickgiesser dickgiesser at gmail.com writes: ... Is there an easy way to add a column name to the first column? What about summary.aggregate - function(y, ...) { temp.mean - aggregate(y, FUN=mean, ...) temp.sd - aggregate(y, FUN=sd, ...) temp.length - aggregate(y, FUN=length,

Re: [R] barcharts with 2 different axes

2006-10-26 Thread Deepayan Sarkar
On 10/26/06, Geoff Russell [EMAIL PROTECTED] wrote: Dear UseRs, I'm having trouble drawing a barchart with 2 quantities in different units as follows with one unit on the top axis and the other unit on the bottom. E.g., x Tonnes | . . . Row 1