[R] Splitting a vector into equal groups

2009-05-04 Thread utkarshsinghal
Hi All, I have vector of length 52, say, x=sample(30,52,replace=T). I want to sort x and split into five *nearly equal groups*. Note that the observations are repeated in x so in case of a tie I want both the observations to fall in same group. This seems a very common task to do, but still I

Re: [R] Splitting a vector into equal groups

2009-05-04 Thread ronggui
lattice:::equal.count may be what you want. 2009/5/4 utkarshsinghal utkarsh.sing...@global-analytics.com: Hi All, I have vector of length 52, say, x=sample(30,52,replace=T). I want to sort x and split into five *nearly equal groups*. Note that the observations are repeated in x so in case of

Re: [R] Splitting a vector into equal groups

2009-05-04 Thread Dimitris Rizopoulos
check functions cut() and quantile(), and cut2() from package Hmisc; maybe the following is close to what you want: x - sample(30, 52, replace = TRUE) k - 5 # how many groups qs - quantile(x, seq(0, 1, length.out = k + 1)) y - cut(x, round(qs), include.lowest = TRUE) y table(y) I hope it

Re: [R] Splitting a vector into equal groups

2009-05-04 Thread Berwin A Turlach
G'day Utkarsh, On Mon, 04 May 2009 11:51:21 +0530 utkarshsinghal utkarsh.sing...@global-analytics.com wrote: I have vector of length 52, say, x=sample(30,52,replace=T). I want to sort x and split into five *nearly equal groups*. What do you mean by *nearly equal groups*? The size of the

[R] QUADRATIC TREND FOR LINK FUNCTIONS ON NON-STATIONARY GEV

2009-05-04 Thread albertob
Hi All, I am a newcomer to R. Could anyone explain me how to define link functions for either mu/sigma to allow for quadratic trends in the same, when fitting non-stationary GEV distributions? Thanks -- View this message in context:

[R] Question of Quantile Regression for Longitudinal Data

2009-05-04 Thread Helen Chen
Dear R user, I am trying to estimate a quantile regression using panel data. I am trying to use the model that is described in Dr. Koenker's article. So I use the code the that is posted in the following link: http://www.econ.uiuc.edu/~roger/research/panel/rq.fit.panel.R I use plm package

[R] normality test for large a large dataset ?

2009-05-04 Thread Martial Sankar
Hello, Do you know a R implemented normality test like the shapiro test but more suitable for large data set ? Thanks, _ Découvrez toutes les possibilités de communication avec vos proches [[alternative HTML version

Re: [R] Division ?

2009-05-04 Thread Martin Maechler
TH == Ted Harding ted.hard...@manchester.ac.uk on Sun, 03 May 2009 10:11:04 +0100 (BST) writes: TH On 02-May-09 17:34:15, bogdanno wrote: It seems division with numbers bigger than 10 000 000 doesn't work 2000/21 [1] 952381 /23 [1] 2415459

[R] quadratic programming

2009-05-04 Thread Barbara . Rogo
Devo risolvere un problema di minimo vincolato con vincoli di uguaglianza e un altro con vincoli di uguaglianza e disuguaglianza. Cosa posso utilizzare? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Surface for R outside of R

2009-05-04 Thread koj
Hi all, i am new here and this is my first posting. My coding experience in R ist okay, but I have a problem which is related to another aspect of R. I am searching for a surface which execute my commands in R via a click on a button OUTSIDE of R. Concrete: I will write some programs in R and

[R] Need to clean a table, and compute mean and SD

2009-05-04 Thread Thom_249
Hi For a school project I have a file with 120 columns and ~2000 lines. This file contains timestamps of spike detected in 60 channels, and the time elapsed between the last spike. I need to clean too high values. About 98% of values are between 0 and 2000 and 2% are between 2000 and 20'000. I

[R] About the Transfer Function Model(ARIMAX)

2009-05-04 Thread Ramanath Roy
Dear ALL, I would appreciate if someone help me by letting me know the code of above model in R.I would request you to please let me know how i could make arimax model in auto.arima. Regards Ramanath [[alternative HTML version deleted]] __

Re: [R] How to skip rest of code

2009-05-04 Thread bartjoosen
How about: x - F if (x) { print(true) } else { print(false) } Bart mli-2 wrote: Dear R users, Suppose I have 2 R script files: 'test1.R' and 'test2.R' and one R file 'main.R' which sources each of them. I wonder if there is a way to skip rest of code in 'test1.R' once a condition

[R] wrong if-else syntax

2009-05-04 Thread mauede
What is wrong in the following nested if-else statements: if (Condition_1) { # begin IF_1 statement_1 statement_2 statement_3 if (Condition_2) { # begin IF_2 a- a +1 } # end

Re: [R] quadratic programming

2009-05-04 Thread Stephan Kolassa
Hi, The CRAN Task View on Optimization may help: http://stat.ethz.ch/CRAN/web/views/Optimization.html HTH, Stephan barbara.r...@uniroma1.it schrieb: Devo risolvere un problema di minimo vincolato con vincoli di uguaglianza e un altro con vincoli di uguaglianza e disuguaglianza. Cosa posso

[R] Odp: Need to clean a table, and compute mean and SD

2009-05-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.05.2009 09:53:19: Hi For a school project I have a file with 120 columns and ~2000 lines. This file contains timestamps of spike detected in 60 channels, and the time elapsed between the last spike. I need to clean too high values. About

Re: [R] odbcConnectAccess function

2009-05-04 Thread bartjoosen
You can use R CMD BATCH if I'm correctly. How about define a query through your routine, process the results of this query through R, write this output in a new table, or a textfile, and load this with your subroutine. Bart Felipe Carrillo wrote: Steve: I am already using it importing

[R] Randomized-complete blocks design and R

2009-05-04 Thread alis villiyam
Hi, I am new in R.I am trying to analysis of variance for Randomized-complete blocks design. I have 4 treatments and 3 replication, Without intraction.then .I is going to use LSD test or Duncan test for comparison between average values of treatments. I want to know, is there any

Re: [R] clear screen?

2009-05-04 Thread Duncan Murdoch
On 03/05/2009 6:50 PM, Charles Annis, P.E. wrote: I’ve been using this routine for several years. I’m sorry, I don’t remember where I got it. It works as it should, viz. it blanks the R console. But it requires package rcom and now that requires rscproxy. cls - function () {

Re: [R] wrong if-else syntax

2009-05-04 Thread Duncan Murdoch
On 04/05/2009 5:08 AM, mau...@alice.it wrote: What is wrong in the following nested if-else statements: if (Condition_1) { # begin IF_1 statement_1 statement_2 statement_3 if (Condition_2) { # begin IF_2 a- a +1

[R] Creating a variable which is the sum of equal rows in a dataframe

2009-05-04 Thread Cecilia Carmo
Hi everyone: I need to count the number of banks of each firm in my data. The firm is identified by the fiscal number. The banks of each firm appears like this: Firm Banks 500600700 Citybank 500600700 CGD 500600700 BES 500600800

Re: [R] Surface for R outside of R

2009-05-04 Thread Duncan Murdoch
On 04/05/2009 4:12 AM, koj wrote: Hi all, i am new here and this is my first posting. My coding experience in R ist okay, but I have a problem which is related to another aspect of R. I am searching for a surface which execute my commands in R via a click on a button OUTSIDE of R. Concrete: I

[R] Caret package: coeffcients for regression

2009-05-04 Thread Alex Roy
Dear All, I am using Caretpackage for SVM regression and elastic net regression . I can get the final fiited vs observed values. How can I get the coefficients? Any ideas? Thanks Alex [[alternative HTML version deleted]] __

Re: [R] Creating a variable which is the sum of equal rows in a dataframe

2009-05-04 Thread baptiste auguie
Try this, # d - read.table(pipe(pbpaste), head=T) # read your data table(d) # library(reshape) cast(as.data.frame(table(d)), .~Firm, fun=sum) HTH, baptiste On 4 May 2009, at 13:19, Cecilia Carmo wrote: Hi everyone: I need to count the number of banks of each firm in my data. The firm

[R] levelplot question

2009-05-04 Thread Antje
Hi there, I have a question concerning the behaviour of the colouring with levelplot. (I hope, I manage to explain) If I give the parameters at and col.regions like this: at - c(1,2,3,4,5,6) col.regions - c(blue,blue,blue,yellow,yellow,yellow) Which color would have the value 3.5? I would

[R] Odp: Creating a variable which is the sum of equal rows in a dataframe

2009-05-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.05.2009 13:19:15: Hi everyone: I need to count the number of banks of each firm in my data. The firm is identified by the fiscal number. The banks of each firm appears like this: Firm Banks 500600700 Citybank

Re: [R] Creating a variable which is the sum of equal rows in a dataframe

2009-05-04 Thread Fredrik Karlsson
Hi Cecilia, You can use table for this: #Generate a dataframe dat.df - data.frame(Firm = sample(c(500600700,500600800,500600800),6,replace=TRUE),Banks=sample(c(Citybank,CGD,DES,Bank1),6,replace=TRUE) ) #Get the counts in a table format with(dat.df, table(Firm,Banks)) Banks

Re: [R] clear screen?

2009-05-04 Thread Gabor Grothendieck
On Mon, May 4, 2009 at 6:50 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 03/05/2009 6:50 PM, Charles Annis, P.E. wrote: I’ve been using this routine for several years.  I’m sorry, I don’t remember where I got it.  It works as it should, viz. it blanks the R console.  But it requires

Re: [R] Creating a variable which is the sum of equal rows in a dataframe

2009-05-04 Thread Gabor Grothendieck
Try aggregate. First we read the data into DF and then apply aggregate: Lines - Firm Banks + 500600700 Citybank + 500600700 CGD + 500600700 BES + 500600800 Citybank + 500600800 Bank1 + 500600900 CGD # DF -

Re: [R] About the Transfer Function Model(ARIMAX)

2009-05-04 Thread David Winsemius
pages 43-54 of: http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf ... is an article by Uwe Ligges on accesssing source code. On Apr 2, 2009, at 4:20 AM, Ramanath Roy wrote: Dear ALL, I would appreciate if someone help me by letting me know the code of above model in R.I would request

[R] how to remove ( ) ? when using write.csv(chron.object)

2009-05-04 Thread Qianfeng Li
Hello all, I don' like to have ( ) around my datetime, when send the csv file to somebody. How to remove it? library(chron) mydate - c(2009-05-03,2009-06-07) mytime - c(10:30:00,10:20:00) mydatetime - chron(dates=mydate,times=mytime,format=c(y-m-d,h:m:s)) write.csv(mydatetime)   ,x 1,(09-05-03

[R] levelplot question

2009-05-04 Thread Antje
@Dieter: You implicitly expect round(). Your question implies that you may also susceptible to the problem of R FAQ 7.31, Why doesn't R think these numbers are equal? No, I guess, you misunderstood my question. These vectors (at and col.regions) are given to levelplot together with some

Re: [R] Surface for R outside of R

2009-05-04 Thread Hans-Peter Suter
want an analysis. The best case were a surface of e.g. 8 Buttons, each click leads to start a specific R file. My outputs are JPEG or CSV, so I don`t need the output inside of R. Could anyone can give me some recommendations, what could be a solution (e. g. Java)? Is such a solution possible?

Re: [R] how to remove ( ) ? when using write.csv(chron.object)

2009-05-04 Thread Gabor Grothendieck
Try: write.csv(format(mydatetime, enclosed = c(, ))) ,x 1,09-05-03 10:30:00 2,09-06-07 10:20:00 On Mon, May 4, 2009 at 10:34 AM, Qianfeng Li qflic...@yahoo.com wrote: Hello all, I don' like to have ( ) around my datetime, when send the csv file to somebody. How to remove it?

Re: [R] Support Vector Machines

2009-05-04 Thread David Winsemius
On May 4, 2009, at 8:52 AM, excalibur wrote: This question is still unanswered. Unanswered questions are often those which do not comply with the guidelines in the Posting Guide. Many people have gotten tired of either making up examples or of writing Read the Posting Guide, so they

Re: [R] Caret package: coeffcients for regression

2009-05-04 Thread Max Kuhn
Alex, I am using Caretpackage for SVM regression and elastic net regression . I can get the final fiited vs observed values. How can I get the coefficients? Any ideas? You didn't say what version of caret and R you are using, what kernel or what type of coefficients. If you tune a model

[R] Reversing axis label order

2009-05-04 Thread Steve Murray
Dear R Users, I am executing the following command to produce a line graph: matplot(aggregate_1986[,1], aggregate_1986[,2:3], type=l, col=2:3) On the x-axis I have values of Latitude (in column 1) ranging from -60 to +80 (left to right on the x-axis). However, I wish to have these values

[R] mosaic plot with two factors and one continous variable

2009-05-04 Thread Karsten Weinert
Hello, my dataset is already aggregated: I have two categorical variables, say continent and country and one non-negative metric variable population. Now I would like to produce a mosaic plot which uses population to determine how large each area of the plot is. In other words, I fail to find out

[R] can install.packages() copy utility files to the public_html directory ?

2009-05-04 Thread Markus Loecher
Dear fellow R-users, I am about to publish an HTML utility package to CRAN that expands on the R2HTML package and includes a few goodies such as sorted tables, easy automation of framed HTML reporting, etc. However, some of the resulting dynamic HTML pages need to access JavaScript code that

Re: [R] Dynamic visualisation of R data using Adobe FLEX

2009-05-04 Thread Harsh
Hi Yihui, In trying to make FLEX and R talk, I have decided to approach it by using the Rserver JRclient as the middle tier in a three tier approach. Tier 1: FLEX Visualisation Tier 2: JRclient (http://rosuda.org/Rserve/example.shtml) Tier 3: Rserver I have yet to begin working on this front, but

Re: [R] can install.packages() copy utility files to the public_html directory ?

2009-05-04 Thread Gabor Grothendieck
2009/5/4 Uwe Ligges lig...@statistik.tu-dortmund.de: Markus Loecher wrote: Dear fellow R-users, I am about to publish an HTML utility package to CRAN that expands on the R2HTML package and includes a few goodies such as sorted tables, easy automation of framed HTML reporting, etc.

Re: [R] normality test for large a large dataset ?

2009-05-04 Thread Ben Bolker
Martial Sankar wrote: Do you know a R implemented normality test like the shapiro test but more suitable for large data set ? Try installing the nortest package. -- View this message in context:

Re: [R] levelplot question

2009-05-04 Thread Dieter Menne
Antje niederlein-rstat at yahoo.de writes: I have a question concerning the behaviour of the colouring with levelplot. If I give the parameters at and col.regions like this: at - c(1,2,3,4,5,6) col.regions - c(blue,blue,blue,yellow,yellow,yellow) Which color would have the value 3.5?

Re: [R] Need to clean a table, and compute mean and SD

2009-05-04 Thread Luc Villandre
Thom_249 wrote: Hi For a school project I have a file with 120 columns and ~2000 lines. This file contains timestamps of spike detected in 60 channels, and the time elapsed between the last spike. I need to clean too high values. About 98% of values are between 0 and 2000 and 2% are between

Re: [R] Reversing axis label order

2009-05-04 Thread Patrizio Frederic
Dear Steve, I'm not sure I properly understood the question. Try x- aggregate_1986 # just a shortcut n- dim(x)[[1]] matplot(x[n:1,1], x[n:1,2:3], type=l, col=2:3) is that what you needed? Patrizio 2009/5/4 Steve Murray smurray...@hotmail.com: Dear R Users, I am executing the following

Re: [R] mosaic plot with two factors and one continous variable

2009-05-04 Thread Achim Zeileis
On Mon, 4 May 2009, Karsten Weinert wrote: Hello, my dataset is already aggregated: I have two categorical variables, say continent and country and one non-negative metric variable population. Now I would like to produce a mosaic plot which uses population to determine how large each area of

Re: [R] Support Vector Machines

2009-05-04 Thread excalibur
This question is still unanswered. Someone can explain me how use the svm function to make density estimation ? Thanks ... excalibur wrote: Hi, i try to use function svm of package e1071 to estimate a density. But if my data are X=(X1,...,Xn) and m-svm(X) some values of m$SV are

[R] Zelig, oprobit error

2009-05-04 Thread Jennifer Brea
Hello, I'm getting an error message when I use the ordered probit model oprobit in the zelig function. Using the same form as in the help file, we get an error message. It produces coefficients, but no standard errors. See results below. Any hints? Thanks! o.probit -

[R] Handling Error Thrown After source(...), read.table(...), and readLines(...)

2009-05-04 Thread Jason Rupert
Finally, I'm getting to a point in working with R where I would like to start to add some smart and custom error handling. Specifically, I would like to add custom error handling to my code for source(...), read.table(...), and readLines(...) For example, right now I have the following:

Re: [R] normality test for large a large dataset ?

2009-05-04 Thread Greg Snow
See: http://finzi.psych.upenn.edu/R/Rhelp08/archive/136160.html But the issue really comes down to the fact that the questions: exactly normal?, and normal enough? are 2 very different questions (with the difference becoming greater with increased sample size) and while the first is the easier

[R] Cox Proportional Odds Model

2009-05-04 Thread Steve Jaffe
Is there a function, like coxph for the proportional hazard model, for fitting a discrete-time proportional odds model? -- View this message in context: http://www.nabble.com/Cox-Proportional-Odds-Model-tp23373426p23373426.html Sent from the R help mailing list archive at Nabble.com.

[R] Code of the max() function

2009-05-04 Thread Paul Smith
Dear All, Where can one find the code of the max() function? Is that written in C? Thanks in advance, Paul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] help_if command_new column

2009-05-04 Thread barbara horta e costa
Hi everyone, Do you know how to apply a If command to a vector in a data.frame, creating a new column? Example: If one species has 1 value in the Abundance column then it is Solitary. If the abundance is higher than 1, is School. I did: aggregationFunction -function(x){ (if (x1) a-

[R] Java-R

2009-05-04 Thread andrea.sp...@quantide.com
Dear R user We would be interested to talk with someone, living in Milan (Italy) area, with good experience in Java-R based applications development. We can provide good R skills but we are poor java programmers Can anyone help? Thanks in advance for any help -- Andrea Spano' Quantide s.r.l.

Re: [R] Hierarchical Diagram of Networks in sna or otherwise?

2009-05-04 Thread jebyrnes
Nearly. The algorithm turns up slightly different graphs each time (and set.seed doesn't seem to make it consistent) and periodically chokes. But better than what I had. Hrm. I don't know much about the algorithm graphviz uses for dot. Do you have a reference on hand? If it's simple, I'd be

Re: [R] help_if command_new column

2009-05-04 Thread David Winsemius
You should be looking at the ifelse function. Ihe if and else constructs are not appropriate for recoding because they do not return vectors. Much easier than all that folderol would be: df$Aggregation - ifelse( df$Number1, School, Solitary) On May 4, 2009, at 12:31 PM, barbara horta e

Re: [R] Surface for R outside of R

2009-05-04 Thread Francisco J. Zagmutt
Hi Koj, I just completed a Windows application using the batch approach and it works very well. In our case, we used VBA for Excel to call different batch files that execute R code, but you can do the same from any platform. Here is a simple step-by-step example on how to make the batch

Re: [R] Nelson-Aalen estimator of cumulative hazard

2009-05-04 Thread Ravi Varadhan
Hi, I figure out the reason for the difference. There are ties in failure times in the data set. Consequently, it matters which method is used to handle ties in coxph. The default is efron. If I use method=breslow, there is no difference between the 2 different ways of computing the

[R] Producing a legend successfullly

2009-05-04 Thread Steve Murray
Dear all, I'm attempting to insert a legend into a line graph. I've sorted out the positioning, but I'm unable to display the sample line and associated colour to go within the legend box. Instead, under the variable names, the numbers 1, 2, 2, 3 are displayed in a column (with '2' repeated

[R] ellipsis problem

2009-05-04 Thread tyler
Hi, I'm confused about the use of ellipsis in function arguments. I'm trying to write a wrapper for plot to automate the combination of plot() and points() calls for a data.frame. Some arguments seem to get passed through to the inner plot, while others cause an error: Error in eval(expr,

Re: [R] Code of the max() function

2009-05-04 Thread David Winsemius
On May 4, 2009, at 2:06 PM, Paul Smith wrote: Dear All, Where can one find the code of the max() function? Is that written in C? pages 43-54 of: http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf ... is an article by Uwe Ligges on accesssing source code. David Winsemius, MD Heritage

[R] [R-pkgs] frontier 0.99 is NOT backward compatible

2009-05-04 Thread Arne Henningsen
Dear current (and future) users of the frontier package, We are approaching the first stable version (1.0) of the frontier package, which provides tools for microeconomic Stochastic Frontier Analysis (SFA). I have uploaded a kind of beta release (version 0.99) of this package to CRAN. The most

[R] rotate texts

2009-05-04 Thread phoebe kong
Hi all, I'm hoping to add texts into a plot. I'm using text() to do it. I wonder if the text() allow me to make the text vertically printed? Thanks in advance for help, phoebe [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Hierarchical Diagram of Networks in sna or otherwise?

2009-05-04 Thread William Revelle
Jarrett, At 11:31 AM -0700 5/4/09, jebyrnes wrote: Nearly. The algorithm turns up slightly different graphs each time (and set.seed doesn't seem to make it consistent) and periodically chokes. But better than what I had. Hrm. I don't know much about the algorithm graphviz uses for dot. Do

Re: [R] Surface for R outside of R

2009-05-04 Thread Gabor Grothendieck
Also see Rscript.bat in the same batchfiles distribution. It automatically finds Rscript.exe by looking in the registry in the same way that Rcmd.bat finds Rcmd.exe. On Mon, May 4, 2009 at 2:43 PM, Francisco J. Zagmutt gerifalt...@hotmail.com wrote: Hi Koj, I just completed a Windows

Re: [R] Producing a legend successfullly

2009-05-04 Thread Peter Flom
Steve Murray smurray...@hotmail.com wrote I'm attempting to insert a legend into a line graph. I've sorted out the positioning, but I'm unable to display the sample line and associated colour to go within the legend box. Instead, under the variable names, the numbers 1, 2, 2, 3 are displayed

Re: [R] Producing a legend successfullly

2009-05-04 Thread Sarah Goslee
This works for me: plot(1:10, 1:10) legend(topleft, c(Simulation, Observation), lty=1:2, col=2:3) Try that; if it does work, then we need more information about exactly what you're doing, because there's a problem not contained in just that single line of code (which has a problem of its own!).

Re: [R] Producing a legend successfullly

2009-05-04 Thread Jorge Ivan Velez
Dear Steve, Try this: x-rnorm(100) y-rnorm(100) + 2*x plot(x,y) legend('topleft', c(Simulation, Observation), lty=1:2, col=2:3) abline(x,y,col=3,lty=2) (you forgot a ) in your code :( ) HTH, Jorge On Mon, May 4, 2009 at 2:46 PM, Steve Murray smurray...@hotmail.com wrote: Dear all, I'm

Re: [R] ellipsis problem

2009-05-04 Thread Duncan Murdoch
On 5/4/2009 2:55 PM, tyler wrote: Hi, I'm confused about the use of ellipsis in function arguments. I'm trying to write a wrapper for plot to automate the combination of plot() and points() calls for a data.frame. Some arguments seem to get passed through to the inner plot, while others cause

Re: [R] Code of the max() function

2009-05-04 Thread Paul Smith
On Mon, May 4, 2009 at 7:47 PM, David Winsemius dwinsem...@comcast.net wrote: Where can one find the code of the max() function? Is that written in C? pages 43-54 of: http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf ... is an article by Uwe Ligges on accesssing source code. Thanks,

Re: [R] Producing a legend successfullly

2009-05-04 Thread baptiste auguie
your code is missing a closing bracket for the text labels, legend(1,4, c(Simulation, Observation), lty=1:2, col=2:3) baptiste On 4 May 2009, at 20:46, Steve Murray wrote: Dear all, I'm attempting to insert a legend into a line graph. I've sorted out the positioning, but I'm unable to

Re: [R] rotate texts

2009-05-04 Thread David Winsemius
On May 4, 2009, at 3:04 PM, phoebe kong wrote: Hi all, I'm hoping to add texts into a plot. I'm using text() to do it. I wonder if the text() allow me to make the text vertically printed? This worked in a plot I hapened to have lying around: text(1,1,test, srt=90) David Winsemius,

[R] Calculating relative ratios in a data frame..

2009-05-04 Thread Zeljko Vrba
I have a data-set that is structured as follows: spwgn v.realtime v.cputime v.tcputime v.idletime v.nswtch 9 0 11 28.61300 28.6128.6039 0.0e+00 407 1563 0 12 15.20270 30.3828.5981 9.80523e-01 483 3128 0 1

[R] sm.density.compare

2009-05-04 Thread Claudia Penaloza
I've been using the sm.denstiy.compare function and would like to know some specifics: a) What kind of bootstrap sampling is used, with or without replacement? b) A p-value is returned after running the following script (for example): library(sm) y - rnorm(100) g - rep(1:2, rep(50,2))

[R] to the person who asked about dividing by the base row

2009-05-04 Thread markleeds
to whomever that was. i deleted your email but I think below does what you want. as always, there's probably some improvement that could be done. whether it's  minor or major, i'm not sure ? also, 3 things:  A)there are some Inf's in the output because of division by zero but

Re: [R] Calculating relative ratios in a data frame..

2009-05-04 Thread jim holtman
Here is a way -- you are dividing by zero in the scaling: x sp wg n v.realtime v.cputime v.tcputime v.idletime v.nswtch 9 0 1 1 28.61300 28.6128.6039 0.000 407 1563 0 1 2 15.20270 30.3828.5981 0.9805230 483 3128 0 1 4 12.50930 50.00

Re: [R] can install.packages() copy utility files to the public_html directory ?

2009-05-04 Thread Uwe Ligges
Markus Loecher wrote: Dear fellow R-users, I am about to publish an HTML utility package to CRAN that expands on the R2HTML package and includes a few goodies such as sorted tables, easy automation of framed HTML reporting, etc. However, some of the resulting dynamic HTML pages need to access

[R] ellipse

2009-05-04 Thread Antonio Lucadamo
Dear all, I'm using the ellipse package and I would like to verify if the confidence region that I build with this package can be equivalent to an Union Intersection Test. I used different value for the t-statistic but I can not find the right equivalence. Does someone know how to choose the

[R] A variation on the bar plot

2009-05-04 Thread dxc13
Hi all, I cannot think of the technical name of this plot, but I want to create a plot with the data below that looks like two back-to-back horizontal bar plots. Ideally, there would be a vertical line in the center of the plot at zero, and on the right hand side would be 4 bars representing the

Re: [R] Optim function in the loop

2009-05-04 Thread Rstarer
Thanks for the reply. optim(initpar,Linn,NULL,method=BFGS,hessian=TRUE,control=list(trace=1,REPORT=1,maxit=300)) The optim is to minimize the negative likelihood function which is performed in function Linn, Every time the code stops right after optim, for example, the output looks like:

[R] FOURIER INTEGRALS IN R

2009-05-04 Thread Achilleas Achilleos
Hi, I am wondering whether there exist any function in R (any package) that calculates Fourier Integrals. Particularly, I am interested for estimation of a Cosine Fourier integral... I would be much obliged if you could help me on this.. Thanks. Andreas --

Re: [R] A variation on the bar plot

2009-05-04 Thread Gabor Grothendieck
Check out the back to back histogram here: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=136 On Mon, May 4, 2009 at 2:58 PM, dxc13 dx...@health.state.ny.us wrote: Hi all, I cannot think of the technical name of this plot, but I want to create a plot with the data below that

[R] questions about function arima0

2009-05-04 Thread Beáta Darabos
Hi, I work on order estimation for autoregressive processes and after some inconsistencies cropped up I implemented the AIC criterion myself. Its results do not match the implementation in R and there are a few things I can not understand even after reading the source code of R. I used the

Re: [R] A variation on the bar plot

2009-05-04 Thread S Ellison
It's sometimes called a pyramid plot. The plotrix package has one. See ?pyramid.plot dxc13 dx...@health.state.ny.us 05/04/09 7:58 PM Hi all, I cannot think of the technical name of this plot, but I want to create a plot with the data below that looks like two back-to-back horizontal bar

Re: [R] ellipsis problem

2009-05-04 Thread tyler
Duncan Murdoch murd...@stats.uwo.ca writes: On 5/4/2009 2:55 PM, tyler wrote: This looks like another manifestation of the following bug: [...] which has recently been fixed in R-patched. I haven't traced through it, but I do see the same error as you in 2.9.0, but not in 2.9.0 patched.

[R] S4 slot of type connection [Sec=Unclassified]

2009-05-04 Thread Troy Robertson
I am having trouble declaring a slot of type connection or file in which to store a file connection. I get a warning message when class definition is loaded: In .completeClassSlots(ClassDef, where) : undefined slot classes in definition of Element: datafileConn(class file) Can anyone

Re: [R] FOURIER INTEGRALS IN R

2009-05-04 Thread andrew
integrate offers some one-dimensional algorithms, but you need to start with a smooth function to get it to converge properly. With a cosine integral, there may be certain routines that offer better value for money: the Clenshaw-Curtis integration, or perhaps the FFT. You would have to recast

[R] Way to handle variable length and numbers of columns using read.table(...)

2009-05-04 Thread Jason Rupert
I've got read.table to successfully read in my table of three columns. Most of the time I will have a set number of rows, but sometime that will be variable and sometimes there will be only be two variables in one row, e.g. Time Loc1 Loc2 1 22.33 44.55 2 66.77 88.99 3 222.33344.55 4 66.77

Re: [R] Way to handle variable length and numbers of columns using read.table(...)

2009-05-04 Thread jim holtman
Well if you read in your data, you get: x - read.table('clipboard', header=TRUE, fill=TRUE) Warning message: In read.table(clipboard, header = TRUE, fill = TRUE) : incomplete final line found by readTableHeader on 'clipboard' x Time Loc1 Loc2 1122.33 44.55 22

Re: [R] Way to handle variable length and numbers of columns using read.table(...)

2009-05-04 Thread Gabor Grothendieck
Its not clear exactly what the rules are for this but if we assume that numbers always end in a decimal plus two digits then using stapply from the gsubfn package: Lines - Time Loc1 Loc2 + 1 22.33 44.55 + 2 66.77 88.99 + 3 222.33344.55 + 4 66.77 88.99 library(gsubfn) L -

Re: [R] Way to handle variable length and numbers of columns using read.table(...)

2009-05-04 Thread Jason Rupert
Jim, You guessed it. There are other problems with the data. Here is a closer representation of the data: Total time and location are listed below. Time Loc1 Loc2 --- 1 22.33 44.55 2 66.77 88.99 3 222.33344.55 4 66.77 88.99 Avg. Loc1 = 77.88 Avg. Loc2 = 55.66 Final Time = 4

Re: [R] Way to handle variable length and numbers of columns using read.table(...)

2009-05-04 Thread Gabor Grothendieck
The last line should be as follows (as the previous post missed the time column). The regular expression says either start from beginning (^) and look for a string of digits, [0-9]+, or look for digits [0-9]*, a dot [.] and two more digits [0-9][0-9]. Each time strapply finds such a match

Re: [R] Calculating relative ratios in a data frame..

2009-05-04 Thread Zeljko Vrba
On Mon, May 04, 2009 at 04:44:37PM -0400, jim holtman wrote: Here is a way -- you are dividing by zero in the scaling: Thanks to both of you who answered. I know about division by zero, but I basically ignore rows having n==1 when plotting. __