Re: [R] Smooth Spline

2008-06-05 Thread lpone
maybe not the optimal but it works: Hi, I have three original curves as follows, n-seq(20,200,by=10) t-c(0.1138, 0.1639, 0.2051, 0.2473, 0.2890, 0.3304, 0.3827, 0.4075, 0.4618, 0.4944, 0.5209, 0.5562, 0.5935, 0.6197, 0.6523, 0.6771, 0.6984, 0.7209, 0.7453) es-c(0.3682, 0.4268, 0.5585,

Re: [R] Creating a simple Radar/Spider Plot from Statgraphics

2008-06-05 Thread Dieter Menne
Albert Crosby acrosby at sdale.org writes: I'm new to R - and trying to create a plot similiar to the spider plot at http://www.statgraphics.com/eda.htm#radar . I can't figure out several things... most of which I would think would be straightforward How can I change the lines

Re: [R] [Rd] An issue happens Embed R and redirt png file

2008-06-05 Thread Rongrong
My R version is R 2.7.0, but the png still can not be used when I embed R in MyApp Dirk Eddelbuettel wrote: Wrong list, so re-directing to r-help. Consider r-sig-debian for Debian questions too, but subscribe or else your posts bounce. On 4 June 2008 at 07:18, Rongrong wrote: | |

Re: [R] sorting the data~

2008-06-05 Thread Philipp Pagel
On Wed, Jun 04, 2008 at 07:36:04PM -0600, Manli Yan wrote: no,the id is variable of a table,such as: treatment id age response low 1 50 20 low 1 60 30 high5 50 30 high5 60 40 ... I want to rearranage the table

Re: [R] sorting the data~

2008-06-05 Thread Philipp Pagel
On Thu, Jun 05, 2008 at 09:05:25AM +0200, Philipp Pagel wrote: a bad idea. Alternatively, this should work: foo$id - cumsum(as.logical(diff(foo$id))) + 1 I should have explicitly said that this only works after sorting, of course. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für

Re: [R] trouble installing Rmpi on 64-bit Ubuntu 8.04 with openmpi

2008-06-05 Thread Paul Hewson
Or (more simply?) install it from the bash prompt using: R CMD INSTALL Rmpi_0.5-5.tar.gz --configure-args=--with-mpi=/opt/openmpi/include/ (or whatever your path to openmpi might be). I missed this as well and confused myself for a bit, but it is mentioned in the R news article on Rmpi H.Yu

[R] R packaging

2008-06-05 Thread Soil inf.
I have followed the instructions of numerous references in trying to package my own functions. It appears as though i have all my paths and programs aligned but i get the following error message when i R CMD CHECK my package: *checking if this is a source bundle.ERROR Only *source* packages

[R] How to combine to PCAs

2008-06-05 Thread Stefan Koenig
Dear all: Subjects were measured two times (t1 and t2) on different variables (v1 ... vn). Between t1 and t2 there was an experimental manipulation. I computed two PCAs for time-points t1 and t2. Is it possible to combine both PCAs in order to get only one set of eigenvectors? Due to the

[R] SARIMA MODEL QUESTION

2008-06-05 Thread ruangkij s
Dear All I have one a question to ask you SARIMA model ( 0,0,1)(1,0,1). Could you help me to write the SARIMA equation as a data below ? Constant 43.557 t = 10.09 Ma -0.37 t = -4.806 SAR 0.991 t = 48.098 SMA 0.915 t = 9.487

Re: [R] Using library in an example

2008-06-05 Thread Jim Lemon
Thanks to Dirk and Duncan Dirk's suggestion of the suppressMessages function unfortunately doesn't quite do the job. The warning message isn't printed, but it is picked up by the check function and leads to a whinge. Duncan is right - I had an older version of maps and installing the new

Re: [R] estimate phase shift between two signals

2008-06-05 Thread ONKELINX, Thierry
Dylan, You can write r sin(x + alfa) as a sin(x) + b cos(x). Then you just have to fit a linear model. r = sqrt(a^2 + b^2) and tan(alfa) = b / a HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en

Re: [R] bartlett.test()

2008-06-05 Thread Birgitle
I think you should specify your grouping factor: g a vector or factor object giving the group for the corresponding elements of x. Ignored if x is a list. batlett.test(xx, groupingfactor) Hope this helps. Birgit hanen wrote: i'm trying to test the homogeneity of variance of 92 samples

[R] bartlett.test()

2008-06-05 Thread hanen
i'm trying to test the homogeneity of variance of 92 samples each one contains 3 observations. to use bartlett.test function i have created a (3,92) matrix (named xx): bartlett.test(xx) this message appears: Erreur dans bartlett.test.default(xx) : l'argument g est manquant, avec aucune

Re: [R] Creating a simple Radar/Spider Plot from Statgraphics

2008-06-05 Thread Jim Lemon
Albert Crosby wrote: I'm new to R - and trying to create a plot similiar to the spider plot at http://www.statgraphics.com/eda.htm#radar . I can't figure out several things... most of which I would think would be straightforward How can I change the lines for each series plotted

Re: [R] [Rd] An issue happens Embed R and redirt png file

2008-06-05 Thread Rongrong
Thanks for your reply. I use following coding to invoke R 2.7.0 process on Debian4: // argv[0] is my current work path char* av[] = {argv[0],--silent,--no-save, --gui=X11}; Rf_initialize_R(4, av); R_Interactive = FALSE; setup_Rmainloop(); I have installed

Re: [R] bartlett.test()

2008-06-05 Thread S Ellison
Birgitle [EMAIL PROTECTED] 05/06/2008 10:33:20 I think you should specify your grouping factor: Yes, the message says the grouping factor is missing. But xx should not be a matrix. Your x data should be in a (1-dimensional) vector of length 276, and so should your grouping factor. Toy

[R] Hyper-elegant code to get a text file, transpose it, and write it

2008-06-05 Thread Alberto Monteiro
Of course this is a trivial task: text.in - readLines(file.in) matrix.in - strsplit(text.in, [ \t]+) # matrix.out - transpose matrix.in # loop over the lines of matrix.out creating text.out writeLines(text.out, file.out) What is the _most elegant_ way to write the transposition of matrix.in

Re: [R] possible bug in flexclust

2008-06-05 Thread Friedrich . Leisch
On Wed, 4 Jun 2008 13:40:58 -0400, Gary Lewis (GL) wrote: Hi - Writing to see if someone can suggest whether a problem warrants a bug report. It concerns the use of stepFlexclust in the flexclust package. The problem concerns the size of clusters returned. Versions: R-2.7.0 on

Re: [R] How to combine to PCAs

2008-06-05 Thread Mark Difford
Hi Stefan, Is it possible to combine both PCAs in order to get only one set of eigenvectors? Yes there is: statis() in the ade4 package is probably what you want. In short, it does a k-table analysis that will give you a common ordination/position. It also shows how each time-set deviates

[R] R and Websites

2008-06-05 Thread stephanos
Hi everybody, my question is simple (yet I found no direct answer on this mailing list): What are the consequences (legalwise) when I use R to do some statistical analysis and outputs on my website (e.g. a user uploads his data, clicks button Summary and as an ouput graphics/text generated from

[R] vector comparison

2008-06-05 Thread Karin Lagesen
I know this is fairly basic, but I must have somehow missed it in the manuals. I have two vectors, often of unequal length. I would like to compare them for identity. Order of elements do not matter, but they should contain the same. I.e: I want this kind of comparison: if (1==1) show(yes)

Re: [R] Hyper-elegant code to get a text file, transpose it, and write it

2008-06-05 Thread Uwe Ligges
Alberto Monteiro wrote: Of course this is a trivial task: text.in - readLines(file.in) matrix.in - strsplit(text.in, [ \t]+) You probably want write.table(t(read.table(file.in)), file = file.out, row.names = FALSE, col.names = FALSE) Uwe Ligges # matrix.out - transpose matrix.in #

Re: [R] R packaging

2008-06-05 Thread Uwe Ligges
Soil inf. wrote: I have followed the instructions of numerous references in trying to package my own functions. It appears as though i have all my paths and programs aligned but i get the following error message when i R CMD CHECK my package: *checking if this is a source bundle.ERROR

Re: [R] R and Websites

2008-06-05 Thread Duncan Murdoch
On 6/5/2008 7:33 AM, stephanos wrote: Hi everybody, my question is simple (yet I found no direct answer on this mailing list): What are the consequences (legalwise) when I use R to do some statistical analysis and outputs on my website (e.g. a user uploads his data, clicks button Summary and as

Re: [R] vector comparison

2008-06-05 Thread jim holtman
This may help: a - c('a') b - c('a','b','c') c - c('a','b','d') all(a %in% b) [1] TRUE all(b %in% a) [1] FALSE all(b %in% c) [1] FALSE d - c('b', 'c') all(d %in% b) [1] TRUE What you probably want to insure that the vectors contain the same elements is: if (all(v1 %in$ v2) all(v2 %in%

Re: [R] vector comparison

2008-06-05 Thread Dimitris Rizopoulos
probably you want to look at: ?any ?all I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web:

Re: [R] Reading selected lines in an .html file

2008-06-05 Thread Uwe Ligges
Of course you could use readLines() and post process by using appropriate functions such as grep(), strsplit() and friends later on. Uwe Ligges vittorio wrote: Dear friend, In an R program running permanently on a server I would like to read hour by hour the temperature in *C and the

Re: [R] vector comparison

2008-06-05 Thread Chuck Cleland
On 6/5/2008 6:38 AM, Karin Lagesen wrote: I know this is fairly basic, but I must have somehow missed it in the manuals. I have two vectors, often of unequal length. I would like to compare them for identity. Order of elements do not matter, but they should contain the same. I.e: I want this

Re: [R] Hyper-elegant code to get a text file, transpose it, and write it

2008-06-05 Thread Alberto Monteiro
Uwe Ligges wrote: Of course this is a trivial task: text.in - readLines(file.in) matrix.in - strsplit(text.in, [ \t]+) You probably want write.table(t(read.table(file.in)), file = file.out, row.names = FALSE, col.names = FALSE) Unfortunately, it doesn't work. In fact,

Re: [R] vector comparison

2008-06-05 Thread Michael Prince
Hello Karin This is your code : a = c(a) b = c(b,c) c = c(c,b) if (a==a) show(yes) else show(blah) if (a==b) show(yes) else show(blah) if (b==c) show(yes) else show(blah) Have a look at the conditions (a==b) and (b==c) a==b [1] FALSE FALSE b==c [1] FALSE FALSE They are size 2. I think R

Re: [R] Hyper-elegant code to get a text file, transpose it, and write it

2008-06-05 Thread Alberto Monteiro
Uwe Ligges wrote: You probably want write.table(t(read.table(file.in)), file = file.out, row.names = FALSE, col.names = FALSE) Ok, almost there. I forgot to tell (because I didn't know) that the strings were separated by tabs (I just thought of splitting by _any_ space), and that the

Re: [R] Hyper-elegant code to get a text file, transpose it, and write it

2008-06-05 Thread Gabor Csardi
On Thu, Jun 05, 2008 at 10:26:08AM -0200, Alberto Monteiro wrote: Uwe Ligges wrote: You probably want write.table(t(read.table(file.in)), file = file.out, row.names = FALSE, col.names = FALSE) Ok, almost there. I forgot to tell (because I didn't know) that the strings were

Re: [R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-05 Thread Dieter Menne
Jim Price price_ja at hotmail.com writes: My apriori apologies if this is felt to be the wrong list for this issue - although it starts with R, it's a combination of programs that creates the problem. Currently we are using windows metafile format for in-text tables for reports created

[R] Space character introduced bu paste

2008-06-05 Thread tolga . i . uzuner
Dear R-Users, I am trying to use paste to paste the character ' around a character vector. Paste appears to place spaces ( ) around this. Anyway this can be done without the unintended introduction of space characters ? Please see example below. Many thanks, Tolga charlist-c(a,b,c)

[R] power of a multiway ANOVA

2008-06-05 Thread biologeeks
dear all, in the package pwr , there is the fonction power.anova.test which permit to obtain the power for a one-way ANOVA...but I'm looking for a way to compute the power of a multiway ANOVA.( find the 1-beta). Is it possible? do you have some ideas ? regards [[alternative HTML

[R] GAM hurdle models

2008-06-05 Thread John Poulsen
Hello, I have been using mgcv to run GAM hurdle models, analyzing presence/absence data with GAM logistic regressions, and then analyzing the data conditional on presence (e.g. without samples with no zeros) with GAMs with a negative binomial distribution. It occurs to me that using the

Re: [R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-05 Thread Mike Prager
Jim Price [EMAIL PROTECTED] wrote: [...] Currently we are using windows metafile format for in-text tables for reports created in Word. However, we've discovered some artifactual lines being created in our final output once the Word document is changed to PDF. The process is as follows:

[R] Delete NA from a dist object

2008-06-05 Thread Birgitle
I have a dist object containing 1 row that is only NA (not very intelligent to have bas dataset with one NA speciesanyway). I would like to delete this row from this object. It may be not a difficult problem but I can not find a solution presently. So I would be very happy if somebody could

Re: [R] How to combine to PCAs

2008-06-05 Thread Ravi Varadhan
Let V = (v11, v12, ..., v1n, v21, v22, ..., v2n) be the matrix of data with 2*n columns. Now, you simply do PCA on this data matrix. See the following paper, which has a related example: Gabriel, K. R. and Odoroff, C. L. (1990). Biplots in biomedical research. Statistics in Medicine, 9,

Re: [R] Space character introduced bu paste

2008-06-05 Thread Karl Ove Hufthammer
[EMAIL PROTECTED]: charlist-c(a,b,c) lapply(charlist, function (y) paste(',y,')) Use 'sep='. And using 'sapply' instead of 'lapply' gives a nicer input. The following works. $ sapply(charlist, function(y) paste(',y,', sep=)) a b c 'a' 'b' 'c' -- Karl Ove Hufthammer

Re: [R] Random Forests regression by strata

2008-06-05 Thread Liaw, Andy
That's currently not supported (because no one up to now had wanted to do it). Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, June 02, 2008 4:21 PM To: r-help@r-project.org Subject: [R] Random Forests

Re: [R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-05 Thread Soukup, Mat
Hi All, I'm by no means an expert on anything related to M$ products... However I was recently forced (reluctantly at that) to put together a PPT presentation which included multiple R graphics. So I thought I'd share what I found to produce decent looking graphics. I created all the graphics

Re: [R] Space character introduced bu paste

2008-06-05 Thread Karl Ove Hufthammer
Karl Ove Hufthammer: Use 'sep='. And using 'sapply' instead of 'lapply' gives a nicer input. The following works. $ sapply(charlist, function(y) paste(',y,', sep=)) a     b     c 'a' 'b' 'c' But a simpler solution is to use sQuote(). Note that by default this may use directional (‘curly’)

Re: [R] Delete NA from a dist object

2008-06-05 Thread Birgitle
Many thanks. Is there a way to give me the number of the row, if I have the row name? B. mel-10 wrote: Birgitle a écrit : I have a dist object containing 1 row that is only NA (not very intelligent to have bas dataset with one NA speciesanyway). I would like to delete this row

Re: [R] GAM hurdle models

2008-06-05 Thread Achim Zeileis
On Thu, 5 Jun 2008, John Poulsen wrote: Hello, I have been using mgcv to run GAM hurdle models, analyzing presence/absence data with GAM logistic regressions, and then analyzing the data conditional on presence (e.g. without samples with no zeros) with GAMs with a negative binomial

Re: [R] Delete NA from a dist object

2008-06-05 Thread mel
Birgitle a écrit : I have a dist object containing 1 row that is only NA (not very intelligent to have bas dataset with one NA speciesanyway). I would like to delete this row from this object. newDistObject = distObject[-unwantedRow, ] hih __

Re: [R] Delete NA from a dist object

2008-06-05 Thread Birgitle
Additonally I got this error message TestDist = Dist.HalbDisGow88[-147,] Fehler in Dist.HalbDisGow88[-147, ] : falsche Anzahl von Dimensionen (Error in Dist.HalbDisGow88[-147, ] : wrong number of dimensions Birgit mel-10 wrote: Birgitle a écrit : I have a dist object containing 1 row

[R] Limit distribution of continuous-time Markov process

2008-06-05 Thread gschultz
I have (below) an attempt at an R script to find the limit distribution of a continuous-time Markov process, using the formulae outlined at http://www.uwm.edu/~ziyu/ctc.pdf, page 5. First, is there a better exposition of a practical algorithm for doing this? I have not found an R package that

Re: [R] vector comparison

2008-06-05 Thread Bert Gunter
.. or identical(sort(unique(a)),sort(unique(b))) -- Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim holtman Sent: Thursday, June 05, 2008 5:01 AM To: Karin Lagesen Cc: r-help@r-project.org Subject: Re:

[R] spherical plots?

2008-06-05 Thread Dieter Vanderelst
Dear List, I'm wondering whether it is possible to use R to make spherical plots. I have 3d data: azimuth, elevation and a certain variable Y. I want to plot Y in terms of azimuth and elevation such that it seems to be a contour plot overlaid on a sphere (but projected on a plane, of

[R] Fourier Transform

2008-06-05 Thread Neil Gupta
Hello All, I wanted to perform a fourier transform on high frequency financial data. I have searched and have not found much on this topic for R. I was wondering if anyone has used any libraries for it or have come across any papers I may read. Many Thanks, Neil Gupta [[alternative

Re: [R] Delete NA from a dist object

2008-06-05 Thread Birgitle
Have still some problems match(name, names(object)) [1] NA which(names(object)==Iname) integer(0) TestDist = object[-name,] Fehler in -name : ungültiges Argument für unären Operator Error in -name: invalid argument for unären (don`t know what this means) operator Thanks Birgit mel-10

Re: [R] Delete NA from a dist object

2008-06-05 Thread mel
Birgitle a écrit : Many thanks. Is there a way to give me the number of the row, if I have the row name? B. a= object 'w' = name match('w', names(a)) # or which(names(a)=='w') # or but deletion should work with the number and/or with the name.

[R] Creating a list of functions

2008-06-05 Thread Andreas Posch
I've been trying to create a list of function where function[[i]] should actually return the value of i. trying: func - vector(list,2) i - 1 while (i = 2) { func[[i]] - function() { i } i - i+1 } however only returned the last value of i for each function. Any help how to achieve the solution

Re: [R] Fourier Transform

2008-06-05 Thread stephen sefick
If you want power spectral density then spec.pgram() and a wrapper to this spectrum should do the trick (MASS which is a part of R base I think) add the argument log=no if you don't want to see the power on a log scale also remember that the smoothed periodogram is a consitent estimator of the

Re: [R] Creating a list of functions

2008-06-05 Thread jim holtman
Is this what you want: func - vector(list,2) i - 1 while (i = 2) + { + func[[i]] - local({ + z - i + function(){ z } + }) + i - i+1 + } func[[1]]() [1] 1 func[[2]]() [1] 2 Your solution was using 'i' which picked up the last definition of 'i'. 'local' create a

[R] Graphing help

2008-06-05 Thread William Pepe
Hoping someone can help me with some graphics. Here is my data set. A B 1 5 1 5 1 6 2 7 3 7 4 7 5 8 6 9 6 10 7 11 Using this code, I split the data into two groups, each of size 5, and made a scatterplot. Bill-read.table('something

[R] Help

2008-06-05 Thread amjadali ktk
Hi, Does anybody know how to install the Arfima 1.01. from OX? They have mentioned it in fARMA package in R but im not succeeded to install it yet. please help me if some one knows about it. nbsp; Thanks [[alternative HTML version deleted]]

Re: [R] How to combine to PCAs

2008-06-05 Thread bady
hi, hi all, There are several methods to analyse two (e.g. coinertia, procuste) or K tables (e.g. statis, mfa, gpa, etc.) in the packages ade4, FactoMiner, etc. Otherwise analyses on instrumental variables can be an interesting way to explore your dataset (e.g. within/between analyses, etc.)

[R] Java to R interface

2008-06-05 Thread madhura
I am developing an application that uses Eclipse framework on Windows. I have to call R from Java. I downloaded rJava package and installed it. I set the classpath in the Run Dialog in Eclipse to the directory where the JRI.jar is. I set the Path environmental variable to the directory where

Re: [R] Creating a list of functions

2008-06-05 Thread Duncan Murdoch
On 6/5/2008 10:50 AM, Andreas Posch wrote: I've been trying to create a list of function where function[[i]] should actually return the value of i. trying: func - vector(list,2) i - 1 while (i = 2) { func[[i]] - function() { i } i - i+1 } however only returned the last value of i for each

Re: [R] Lattice + Word: Changing .wmf files to .pdf files

2008-06-05 Thread Gabor Grothendieck
I also use R PDF graphic files; however, note that they can be imported directly into Word, at least on my version of Word which is Word 2007 on Windows Vista SP1, using Insert | Object (_not_ Insert | Picture) eliminating the intermediate step. On Thu, Jun 5, 2008 at 9:56 AM, Soukup, Mat [EMAIL

Re: [R] Fourier Transform

2008-06-05 Thread Foadi, J (James)
-Original Message- From: [EMAIL PROTECTED] on behalf of Neil Gupta Sent: Thu 6/5/2008 15:21 To: R-help@r-project.org Subject: [R] Fourier Transform Hello All, I wanted to perform a fourier transform on high frequency financial data. I have searched and have not found much on this topic

[R] Securities earning covariance

2008-06-05 Thread ANGELO.LINARDI
Good morning, I am a new R user and I am trying to learn how to use it. I am trying to solve this problem. I have a dataframe df of daily securities (for a year) earnings as follows: SEC_ID DAY EARNING IT001 200701015.467 IT001 20070102

Re: [R] Securities earning covariance

2008-06-05 Thread Gabor Grothendieck
Check out the three vignettes (i.e. pdf documents in the zoo package). e.g. Lines - SEC_ID DAY EARNING IT001 200701015.467 IT001 200701025.456 IT001 200701034.954 IT001 200701043.456 IT002

Re: [R] Securities earning covariance

2008-06-05 Thread Gabor Grothendieck
Replace cov(z) with cov(z, use = pair) is there are missing values as there are here. On Thu, Jun 5, 2008 at 11:54 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Check out the three vignettes (i.e. pdf documents in the zoo package). e.g. Lines - SEC_ID DAY EARNING

Re: [R] Securities earning covariance

2008-06-05 Thread Patrick Burns
I would start by creating a matrix that held the returns with rows being the dates and columns being the securities. You can do this by something along the lines of: days - as.character(df[, 'DAY']) sec - as.character(df[, 'SEC_ID'] earningmat - array(NA, c(length(unique(days)),

[R] Need to run R on Fedora 9.

2008-06-05 Thread RobertsLRRI
I'm in need of a version of R that will run on fedora 9 and haven't been able to find one. I need this in order to run Bioconductor. Any advice? -- View this message in context: http://www.nabble.com/Need-to-run-R-on-Fedora-9.-tp17674187p17674187.html Sent from the R help mailing list archive

Re: [R] Java to R interface

2008-06-05 Thread Bio7
The native *.dll can't be found for any reason. For a first start simply put the native lib in your Eclipse Java project. If you are developing a plugin or a RCP application a must read is this article: http://www.eclipsezone.com/articles/eclipse-vms/ explaining how to load and place native

Re: [R] Need to run R on Fedora 9.

2008-06-05 Thread Jonathan Baron
On 06/05/08 09:28, RobertsLRRI wrote: I'm in need of a version of R that will run on fedora 9 and haven't been able to find one. I need this in order to run Bioconductor. Any advice? Why not say (as root) yum install R ? Worked for me. The point is that there is now a Fedora rpm for R.

Re: [R] label outliers in geom_boxplot (ggplot2)

2008-06-05 Thread hadley wickham
2008/5/27 Mihalicza Péter [EMAIL PROTECTED]: Dear List and Hadley, I would like to have a boxplot with ggplot2 and have the outlier values labelled with their name attribute. So I did library(ggplot2) dat=data.frame(num=rep(1,20), val=c(runif(18),3,3.5), name=letters[1:20])

Re: [R] ggplot questions

2008-06-05 Thread hadley wickham
On Wed, Jun 4, 2008 at 2:03 PM, Thompson, David (MNR) [EMAIL PROTECTED] wrote: Hello, A few questions about the following examples: 1. Why do the two plotting versions not produce the same result? Because version one has two layers, and version two has one? 2. Is the 'scale_x_continuous'

[R] Degree Symbol

2008-06-05 Thread stephen sefick
I have looked at math plot and still can not figure out how to get a degree symbol into the y label. I would like degrees C thanks Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us

[R] Graphing help revisited

2008-06-05 Thread William Pepe
Sorry, my last post came out unreadable. I'll try again. Here is the data. Think of them as transposed columns. A: 1,1,1,2,3,4,5,6,6, 7B: 5,5,6,7,7,7,8,9,10,11 Split the data into two groups, each of size 5, and make a scatterplot. Bill-read.table('something here')

Re: [R] Degree Symbol

2008-06-05 Thread Gabor Grothendieck
Try: RSiteSearch(plotmath degree character) On Thu, Jun 5, 2008 at 1:18 PM, stephen sefick [EMAIL PROTECTED] wrote: I have looked at math plot and still can not figure out how to get a degree symbol into the y label. I would like degrees C thanks Stephen -- Let's not spend our time and

Re: [R] Delete NA from a dist object

2008-06-05 Thread Gabor Grothendieck
Try this: d - dist(USArrests) ix - which(Iowa == labels(d)) d1 - as.dist(as.matrix(d)[-ix, -ix]) On Thu, Jun 5, 2008 at 9:39 AM, Birgitle [EMAIL PROTECTED] wrote: I have a dist object containing 1 row that is only NA (not very intelligent to have bas dataset with one NA speciesanyway).

Re: [R] Graphing help revisited

2008-06-05 Thread Greg Snow
Does this do what you want? Bill - data.frame(A= c(1,1,1,2,3,4,5,6,6,7), B=c(5,5,6,7,7,7,8,9,10,11), group=rep(1:2, each=5) ) with(Bill, plot(A,B, pch=group) ) mns - with(Bill, tapply(B, group, mean)) tmp - par('usr') # or range(Bill$A) med - with(Bill, mean(

Re: [R] power of a multiway ANOVA

2008-06-05 Thread Charles C. Berry
See, http://tolstoy.newcastle.edu.au/R/help/06/05/27989.html HTH, Chuck On Thu, 5 Jun 2008, biologeeks wrote: dear all, in the package pwr , there is the fonction power.anova.test which permit to obtain the power for a one-way ANOVA...but I'm looking for a way to compute the

[R] Improving data processing efficiency

2008-06-05 Thread Daniel Folkinshteyn
Hi everyone! I have a question about data processing efficiency. My data are as follows: I have a data set on quarterly institutional ownership of equities; some of them have had recent IPOs, some have not (I have a binary flag set). The total dataset size is 700k+ rows. My goal is this:

Re: [R] Limit distribution of continuous-time Markov process

2008-06-05 Thread Charles C. Berry
On Thu, 5 Jun 2008, [EMAIL PROTECTED] wrote: I have (below) an attempt at an R script to find the limit distribution of a continuous-time Markov process, using the formulae outlined at http://www.uwm.edu/~ziyu/ctc.pdf, page 5. First, is there a better exposition of a practical algorithm for

[R] negative indexing with null index sets

2008-06-05 Thread roger koenker
Negative indexing is often handy, but I'm in need of an appropriate idiom for handling cases in which the index set can be null: x - rnorm(5) a - 1:5 s - rep(FALSE,5) y - x[-a[s]] # I'd like y == x but instead one has x[-a[s]] == x[a[s]] == numeric(0), which is rather # unfortunate --

Re: [R] ggplot questions

2008-06-05 Thread Thompson, David (MNR)
Thanx Hadley, More questions inline. -Original Message- From: hadley wickham [mailto:[EMAIL PROTECTED] Sent: June 5, 2008 01:09 PM To: Thompson, David (MNR) Cc: r-help@r-project.org Subject: Re: [R] ggplot questions On Wed, Jun 4, 2008 at 2:03 PM, Thompson, David (MNR) [EMAIL

Re: [R] Improving data processing efficiency

2008-06-05 Thread bartjoosen
Maybe you should provide a minimal, working code with data, so that we all can give it a try. In the mean time: take a look at the Rprof function to see where your code can be improved. Good luck Bart Daniel Folkinshteyn-2 wrote: Hi everyone! I have a question about data processing

Re: [R] power of a multiway ANOVA

2008-06-05 Thread Rolf Turner
On 6/06/2008, at 1:08 AM, biologeeks wrote: dear all, in the package pwr , there is the fonction power.anova.test which permit to obtain the power for a one-way ANOVA...but I'm looking for a way to compute the power of a multiway ANOVA.( find the 1-beta). Is it possible? do you have

Re: [R] negative indexing with null index sets

2008-06-05 Thread Gabor Grothendieck
Here are a few possibilities. The first three use seq_along and the last two use if and length: x[ !seq_along(x) %in% a[s] ] x[ !match(seq_along(x), a[s], 0) ] x[ setdiff(seq_along(x), a[s]) ] if (length(a[s])) x[-a[s]] else x x[ if (length(a[s])) -a[s] else TRUE ] On Thu, Jun 5, 2008 at

[R] how to get the distribution curve from a data set?

2008-06-05 Thread rlearner309
I have a question. I have a data set (about 100,000 observations). How would I get the distribution curve graph? This is like, if I use hist(x, freq=TRUE, breaks=1000) to get the histogram, now the question is, I don't need the histogram itself, I just need the curve that connects the top of

[R] two questions about regression models and clustering routines

2008-06-05 Thread Maura E Monville
I managed to use an example (see attachment) of clever regression routines. I customized it to suit my needs. The initial model I try to fit consists of the first 10 powers of time (time the observation was recorded) and the first 10 powers of the phase. In fact my files record patients'

[R] Which lib/func should I use to get S-estimates of multivariate scatter?

2008-06-05 Thread rlearner309
I have a multivariate data set, and I would like to get the S-estimates of the scatter (robust estimates of variance-covariance matrix). Which library/function should I use? Thank you very much! -- View this message in context:

[R] Matrix of data frames

2008-06-05 Thread tolga . i . uzuner
Dear R-Users, Is there a way to create a matrix of data frames in R ? I am pulling in data frames from a SQL database into R using RODBC. I would like to pull in a sequence of data frames which are indexed across two dimensions, and store each data frame as an element in a matrix. I did try

Re: [R] how to get the distribution curve from a data set?

2008-06-05 Thread Henrique Dallazuanna
See ?density On Thu, Jun 5, 2008 at 4:56 PM, rlearner309 [EMAIL PROTECTED] wrote: I have a question. I have a data set (about 100,000 observations). How would I get the distribution curve graph? This is like, if I use hist(x, freq=TRUE, breaks=1000) to get the histogram, now the question

Re: [R] how to get the distribution curve from a data set?

2008-06-05 Thread Daniel Folkinshteyn
would a density plot do? try plot(density(x)) if you are specifically after the histogram tops rather than a density estimate, then get the hist object with plot=F, then look at the counts attribute: histobj = hist(x, freq=TRUE, breaks=1000, plot=F) plot(histobj$counts) hope this helps. on

Re: [R] [Possible SPAM] Reading selected lines in an .html file

2008-06-05 Thread Nutter, Benjamin
I've tried to tackle a similar question at the request of a coworker. Unfortunately, it is difficult to read in HTML code because it lacks character that can consistently be used as a delimiter. The only guideline I can offer is that any text you're interested in is going to be between a and a .

Re: [R] Matrix of data frames

2008-06-05 Thread Gabor Grothendieck
On Thu, Jun 5, 2008 at 4:22 PM, [EMAIL PROTECTED] wrote: Dear R-Users, Is there a way to create a matrix of data frames in R ? Using builtin BOD and women: m - matrix(list(BOD, women, women, BOD), 2) m[[1,2]] # women height weight 1 58115 2 59117 3 60120 4

Re: [R] Improving data processing efficiency

2008-06-05 Thread Daniel Folkinshteyn
Thanks, I'll take a look at Rprof... but I think what i'm missing is facility with R idiom to get around the looping, and no amount of profiling will help me with that :) also, full working code is provided in my original post (see toward the bottom). on 06/05/2008 03:43 PM bartjoosen said

Re: [R] [Possible SPAM] Reading selected lines in an .html file

2008-06-05 Thread Daniel Folkinshteyn
i know this is an R mailing list :) but... i'll recommend you try python with the beautifulsoup module - makes html processing a cinch. another thing to note is that wunderground provides very handy RSS feeds for every location, so rather than parsing the html page (with it's associated

Re: [R] [Possible SPAM] Reading selected lines in an .html file

2008-06-05 Thread Martin Morgan
Staying in R, the XML package in conjunction with the XPATH query language is likely to be your friend. library(XML) html=htmlTreeParse(http://www.wunderground.com/global/stations/16239.html;, useInternal=TRUE) xpathApply(html, //[EMAIL PROTECTED]'tempf' and +@pwsid='LIRA']/@value,

[R] (baseline) logistic regression + gof functions?

2008-06-05 Thread Wim Bertels
 Hallo, which function can i use to do (baseline) logistic regression + goodness of fit tests? so far i found: # logistic on binary data lrm combined with resid(model,'gof') # logistic on binary

Re: [R] linear model in the repeated data type~

2008-06-05 Thread Austin, Matt
allFits - lmList(y ~ t|id, data=table1, pool=FALSE) allCoefs - sapply(allFits, coef) ## preferred by me or allCoefs - list(length(allFits)) for(i in 1:length(allFits)) allCoef[[i]] - coef(allFits[[i]]) --Matt From: Manli Yan [mailto:[EMAIL PROTECTED] Sent:

Re: [R] linear model in the repeated data type~

2008-06-05 Thread Austin, Matt
Apologies, the second method should have been allCoefs - vector(list, length(allFits)) for(i in 1:length(allFits)) allCoefs[[i]] - coef(allFits[[i]]) --Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Austin, Matt Sent: Thursday, June 05, 2008

[R] Existence of formal arguments.

2008-06-05 Thread Rolf Turner
I just discovered what seems to me to be a slight funny in respect of formal argument names. If I define a function foo - function(a,b){ ... whatever ...} then ``inside'' foo() the exists() function will return TRUE from ``exists(a) whether an object named ``a'' exists or not. But

  1   2   >